Move the connection fixing to a Before method so it applies to all the tests
authorAndy Allan <andy@gravitystorm.co.uk>
Sat, 2 Apr 2011 15:26:36 +0000 (16:26 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Sat, 2 Apr 2011 15:26:36 +0000 (16:26 +0100)
tests/src/net/systemeD/halcyon/connection/actions/AddMemberToRelationActionTest.as

index df86b4f..084b135 100644 (file)
@@ -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);