aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-04-21 01:01:24 +0100
committerJustin Clark-Casey (justincc)2012-04-21 01:01:24 +0100
commit71900968b221b89860d1cef162f3b0d1236e1c73 (patch)
tree097b75f2823a4fb752b9cdb96efae6b245c6e8d9
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-71900968b221b89860d1cef162f3b0d1236e1c73.zip
opensim-SC_OLD-71900968b221b89860d1cef162f3b0d1236e1c73.tar.gz
opensim-SC_OLD-71900968b221b89860d1cef162f3b0d1236e1c73.tar.bz2
opensim-SC_OLD-71900968b221b89860d1cef162f3b0d1236e1c73.tar.xz
refactor: extract common setup code in SceneObjectStatusTests
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs26
1 files changed, 16 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
index 16e8b63..b8e1b92 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
@@ -43,22 +43,30 @@ namespace OpenSim.Region.Framework.Scenes.Tests
43 [TestFixture] 43 [TestFixture]
44 public class SceneObjectStatusTests 44 public class SceneObjectStatusTests
45 { 45 {
46 private TestScene m_scene;
47 private SceneObjectGroup m_so1;
48
49 [SetUp]
50 public void Init()
51 {
52 m_scene = SceneHelpers.SetupScene();
53 SceneObjectGroup m_so1 = SceneHelpers.CreateSceneObject(1, UUID.Zero);
54 }
55
46 [Test] 56 [Test]
47 public void TestSetPhantom() 57 public void TestSetPhantom()
48 { 58 {
49 TestHelpers.InMethod(); 59 TestHelpers.InMethod();
50 60
51// Scene scene = SceneSetupHelpers.SetupScene(); 61 SceneObjectPart rootPart = m_so1.RootPart;
52 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, UUID.Zero);
53 SceneObjectPart rootPart = so.RootPart;
54 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 62 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
55 63
56 so.ScriptSetPhantomStatus(true); 64 m_so1.ScriptSetPhantomStatus(true);
57 65
58// Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags); 66// Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags);
59 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Phantom)); 67 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Phantom));
60 68
61 so.ScriptSetPhantomStatus(false); 69 m_so1.ScriptSetPhantomStatus(false);
62 70
63 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 71 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
64 } 72 }
@@ -68,17 +76,15 @@ namespace OpenSim.Region.Framework.Scenes.Tests
68 { 76 {
69 TestHelpers.InMethod(); 77 TestHelpers.InMethod();
70 78
71// Scene scene = SceneSetupHelpers.SetupScene(); 79 SceneObjectPart rootPart = m_so1.RootPart;
72 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, UUID.Zero);
73 SceneObjectPart rootPart = so.RootPart;
74 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 80 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
75 81
76 so.ScriptSetPhysicsStatus(true); 82 m_so1.ScriptSetPhysicsStatus(true);
77 83
78// Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags); 84// Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags);
79 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); 85 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics));
80 86
81 so.ScriptSetPhysicsStatus(false); 87 m_so1.ScriptSetPhysicsStatus(false);
82 88
83 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 89 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
84 } 90 }