diff options
author | Justin Clark-Casey (justincc) | 2012-04-21 02:45:16 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-21 02:45:16 +0100 |
commit | 77a7de87e1c89385bc906d1b409ec1c94c41b9e6 (patch) | |
tree | 25a2eba1790896707dc6048faacdc1661a925c7f | |
parent | Add regression test for prim status when root prim in a new linkset is non-ph... (diff) | |
download | opensim-SC-77a7de87e1c89385bc906d1b409ec1c94c41b9e6.zip opensim-SC-77a7de87e1c89385bc906d1b409ec1c94c41b9e6.tar.gz opensim-SC-77a7de87e1c89385bc906d1b409ec1c94c41b9e6.tar.bz2 opensim-SC-77a7de87e1c89385bc906d1b409ec1c94c41b9e6.tar.xz |
Add test for setting physics in a linkset
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs index 8cdd645..882031c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
58 | } | 58 | } |
59 | 59 | ||
60 | [Test] | 60 | [Test] |
61 | public void TestSetPhantom() | 61 | public void TestSetPhantomSinglePrim() |
62 | { | 62 | { |
63 | TestHelpers.InMethod(); | 63 | TestHelpers.InMethod(); |
64 | 64 | ||
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
76 | } | 76 | } |
77 | 77 | ||
78 | [Test] | 78 | [Test] |
79 | public void TestSetPhysics() | 79 | public void TestSetPhysicsSinglePrim() |
80 | { | 80 | { |
81 | TestHelpers.InMethod(); | 81 | TestHelpers.InMethod(); |
82 | 82 | ||
@@ -92,6 +92,32 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
92 | 92 | ||
93 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | 93 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); |
94 | } | 94 | } |
95 | |||
96 | [Test] | ||
97 | public void TestSetPhysicsLinkset() | ||
98 | { | ||
99 | TestHelpers.InMethod(); | ||
100 | |||
101 | m_scene.AddSceneObject(m_so1); | ||
102 | m_scene.AddSceneObject(m_so2); | ||
103 | |||
104 | m_scene.LinkObjects(m_ownerId, m_so1.LocalId, new List<uint>() { m_so2.LocalId }); | ||
105 | |||
106 | m_so1.ScriptSetPhysicsStatus(true); | ||
107 | |||
108 | Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.Physics)); | ||
109 | Assert.That(m_so1.Parts[1].Flags, Is.EqualTo(PrimFlags.Physics)); | ||
110 | |||
111 | m_so1.ScriptSetPhysicsStatus(false); | ||
112 | |||
113 | Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None)); | ||
114 | Assert.That(m_so1.Parts[1].Flags, Is.EqualTo(PrimFlags.None)); | ||
115 | |||
116 | m_so1.ScriptSetPhysicsStatus(true); | ||
117 | |||
118 | Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.Physics)); | ||
119 | Assert.That(m_so1.Parts[1].Flags, Is.EqualTo(PrimFlags.Physics)); | ||
120 | } | ||
95 | 121 | ||
96 | /// <summary> | 122 | /// <summary> |
97 | /// Test that linking results in the correct physical status for all linkees. | 123 | /// Test that linking results in the correct physical status for all linkees. |