aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs33
1 files changed, 21 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 7737d8e..3398a53 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
88 { 88 {
89 TestHelpers.InMethod(); 89 TestHelpers.InMethod();
90 90
91 Scene scene = SceneHelpers.SetupScene(); 91 Scene scene = new SceneHelpers().SetupScene();
92 int partsToTestCount = 3; 92 int partsToTestCount = 3;
93 93
94 SceneObjectGroup so 94 SceneObjectGroup so
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
118 { 118 {
119 TestHelpers.InMethod(); 119 TestHelpers.InMethod();
120 120
121 Scene scene = SceneHelpers.SetupScene(); 121 Scene scene = new SceneHelpers().SetupScene();
122 122
123 string obj1Name = "Alfred"; 123 string obj1Name = "Alfred";
124 string obj2Name = "Betty"; 124 string obj2Name = "Betty";
@@ -152,7 +152,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
152 { 152 {
153 TestHelpers.InMethod(); 153 TestHelpers.InMethod();
154 154
155 Scene scene = SceneHelpers.SetupScene(); 155 Scene scene = new SceneHelpers().SetupScene();
156 int partsToTestCount = 3; 156 int partsToTestCount = 3;
157 157
158 SceneObjectGroup so 158 SceneObjectGroup so
@@ -185,11 +185,16 @@ namespace OpenSim.Region.Framework.Scenes.Tests
185 { 185 {
186 TestHelpers.InMethod(); 186 TestHelpers.InMethod();
187 187
188 TestScene scene = SceneHelpers.SetupScene(); 188 TestScene scene = new SceneHelpers().SetupScene();
189 SceneObjectPart part = SceneHelpers.AddSceneObject(scene); 189 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene);
190 scene.DeleteSceneObject(part.ParentGroup, false);
191 190
192 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 191 Assert.That(so.IsDeleted, Is.False);
192
193 scene.DeleteSceneObject(so, false);
194
195 Assert.That(so.IsDeleted, Is.True);
196
197 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId);
193 Assert.That(retrievedPart, Is.Null); 198 Assert.That(retrievedPart, Is.Null);
194 } 199 }
195 200
@@ -204,24 +209,28 @@ namespace OpenSim.Region.Framework.Scenes.Tests
204 209
205 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); 210 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
206 211
207 TestScene scene = SceneHelpers.SetupScene(); 212 TestScene scene = new SceneHelpers().SetupScene();
208 213
209 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 214 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
210 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 215 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
211 sogd.Enabled = false; 216 sogd.Enabled = false;
212 217
213 SceneObjectPart part = SceneHelpers.AddSceneObject(scene); 218 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene);
214 219
215 IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient; 220 IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient;
216 scene.DeRezObjects(client, new System.Collections.Generic.List<uint>() { part.LocalId }, UUID.Zero, DeRezAction.Delete, UUID.Zero); 221 scene.DeRezObjects(client, new System.Collections.Generic.List<uint>() { so.LocalId }, UUID.Zero, DeRezAction.Delete, UUID.Zero);
217 222
218 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 223 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId);
219 224
220 Assert.That(retrievedPart, Is.Not.Null); 225 Assert.That(retrievedPart, Is.Not.Null);
221 226
227 Assert.That(so.IsDeleted, Is.False);
228
222 sogd.InventoryDeQueueAndDelete(); 229 sogd.InventoryDeQueueAndDelete();
223 230
224 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId); 231 Assert.That(so.IsDeleted, Is.True);
232
233 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
225 Assert.That(retrievedPart2, Is.Null); 234 Assert.That(retrievedPart2, Is.Null);
226 } 235 }
227 236