aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs37
1 files changed, 26 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
index babdee6..a6e4d4e 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
@@ -84,12 +84,12 @@ namespace OpenSim.Region.Environment.Scenes.Tests
84 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 84 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
85 Assert.That(retrievedPart, Is.Null); 85 Assert.That(retrievedPart, Is.Null);
86 } 86 }
87 87
88 /// <summary> 88 /// <summary>
89 /// Test deleting an object to user inventory 89 /// Test deleting an object asynchronously
90 /// </summary> 90 /// </summary>
91 [Test] 91 [Test]
92 public void TestDeleteSceneObjectToUserInventory() 92 public void TestDeleteSceneObjectAsync()
93 { 93 {
94 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); 94 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
95 95
@@ -101,6 +101,28 @@ namespace OpenSim.Region.Environment.Scenes.Tests
101 101
102 SceneObjectPart part = SceneTestUtils.AddSceneObject(scene); 102 SceneObjectPart part = SceneTestUtils.AddSceneObject(scene);
103 103
104 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId);
105 scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Delete, UUID.Zero);
106
107 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
108 Assert.That(retrievedPart, Is.Not.Null);
109
110 sogd.InventoryDeQueueAndDelete();
111 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
112 Assert.That(retrievedPart2, Is.Null);
113 }
114
115 /// <summary>
116 /// Test deleting an object asynchronously to user inventory. Doesn't yet do what it says on the tin.
117 /// </summary>
118 [Test]
119 public void TestDeleteSceneObjectAsyncToUserInventory()
120 {
121 UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
122
123 TestScene scene = SceneTestUtils.SetupScene();
124 SceneObjectPart part = SceneTestUtils.AddSceneObject(scene);
125
104 ((LocalUserServices)scene.CommsManager.UserService).AddPlugin(new TestUserDataPlugin()); 126 ((LocalUserServices)scene.CommsManager.UserService).AddPlugin(new TestUserDataPlugin());
105 ((LocalInventoryService)scene.CommsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin()); 127 ((LocalInventoryService)scene.CommsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin());
106 128
@@ -110,14 +132,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests
110 Is.EqualTo(agentId)); 132 Is.EqualTo(agentId));
111 133
112 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId); 134 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId);
113 scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Return, UUID.Zero); 135 SceneTestUtils.DeleteSceneObjectAsync(scene, part, DeRezAction.TakeCopy, client);
114
115 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
116 Assert.That(retrievedPart, Is.Not.Null);
117
118 sogd.InventoryDeQueueAndDelete();
119 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(part.LocalId);
120 Assert.That(retrievedPart2, Is.Null);
121 136
122 CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentId); 137 CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentId);
123 Assert.That(userInfo, Is.Not.Null); 138 Assert.That(userInfo, Is.Not.Null);