From: Andy Allan Date: Sat, 2 Apr 2011 15:26:36 +0000 (+0100) Subject: Move the connection fixing to a Before method so it applies to all the tests X-Git-Tag: 2.0~7^2 X-Git-Url: https://git.openstreetmap.org/potlatch2.git/commitdiff_plain/b8f9c27cf533f3b95dd05cdd73c83dde32385223 Move the connection fixing to a Before method so it applies to all the tests --- diff --git a/tests/src/net/systemeD/halcyon/connection/actions/AddMemberToRelationActionTest.as b/tests/src/net/systemeD/halcyon/connection/actions/AddMemberToRelationActionTest.as index df86b4f4..084b135b 100644 --- a/tests/src/net/systemeD/halcyon/connection/actions/AddMemberToRelationActionTest.as +++ b/tests/src/net/systemeD/halcyon/connection/actions/AddMemberToRelationActionTest.as @@ -10,6 +10,13 @@ package net.systemeD.halcyon.connection.actions { public class AddMemberToRelationActionTest { + [Before] + public function setUp():void { + //Instantiate the connection first to prevent errors + Connection.getConnection(); + } + + [Test] public function addMember():void { @@ -18,8 +25,6 @@ package net.systemeD.halcyon.connection.actions { var rel:Relation = new Relation(1,1,{},true,[]); var member:RelationMember = new RelationMember(n, "foo"); - //Instantiate the connection first to prevent errors - Connection.getConnection(); rel.appendMember(member, function(action:UndoableAction):void { action.doAction(); }); Assert.assertEquals(1, rel.length);