diff options
author | Justin Clark-Casey (justincc) | 2012-07-06 23:07:50 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-06 23:07:50 +0100 |
commit | 056c9a59b2fee1e459915bd1ca908107c7c9695d (patch) | |
tree | f163c93b07ff267f523fe2c31e90a7631526a30b /OpenSim/Region/CoreModules/Avatar | |
parent | Mantis 6077 trim NPC chat on channel zero. (diff) | |
download | opensim-SC-056c9a59b2fee1e459915bd1ca908107c7c9695d.zip opensim-SC-056c9a59b2fee1e459915bd1ca908107c7c9695d.tar.gz opensim-SC-056c9a59b2fee1e459915bd1ca908107c7c9695d.tar.bz2 opensim-SC-056c9a59b2fee1e459915bd1ca908107c7c9695d.tar.xz |
Add assert to attachment regression tests to check that number of objects in the scene graph
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 7856953..c1ba8a8 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -149,6 +149,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
149 | InventoryFolderBase targetFolder = scene.InventoryService.GetFolderForType(sp.UUID, AssetType.Object); | 149 | InventoryFolderBase targetFolder = scene.InventoryService.GetFolderForType(sp.UUID, AssetType.Object); |
150 | Assert.That(attachmentItem.Folder, Is.EqualTo(targetFolder.ID)); | 150 | Assert.That(attachmentItem.Folder, Is.EqualTo(targetFolder.ID)); |
151 | 151 | ||
152 | Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(1)); | ||
153 | |||
152 | // TestHelpers.DisableLogging(); | 154 | // TestHelpers.DisableLogging(); |
153 | } | 155 | } |
154 | 156 | ||
@@ -181,6 +183,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
181 | // Check appearance status | 183 | // Check appearance status |
182 | Assert.That(sp.Appearance.GetAttachments().Count, Is.EqualTo(1)); | 184 | Assert.That(sp.Appearance.GetAttachments().Count, Is.EqualTo(1)); |
183 | Assert.That(sp.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo((int)AttachmentPoint.Chest)); | 185 | Assert.That(sp.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo((int)AttachmentPoint.Chest)); |
186 | |||
187 | Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(1)); | ||
184 | } | 188 | } |
185 | 189 | ||
186 | [Test] | 190 | [Test] |
@@ -239,6 +243,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
239 | 243 | ||
240 | // Check item status | 244 | // Check item status |
241 | Assert.That(sp.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo(0)); | 245 | Assert.That(sp.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo(0)); |
246 | |||
247 | Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(0)); | ||
242 | } | 248 | } |
243 | 249 | ||
244 | /// <summary> | 250 | /// <summary> |
@@ -300,6 +306,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
300 | Assert.That(retreivedAttachments[0].ItemID, Is.EqualTo(attItem.ID)); | 306 | Assert.That(retreivedAttachments[0].ItemID, Is.EqualTo(attItem.ID)); |
301 | Assert.That(retreivedAttachments[0].AssetID, Is.EqualTo(attItem.AssetID)); | 307 | Assert.That(retreivedAttachments[0].AssetID, Is.EqualTo(attItem.AssetID)); |
302 | Assert.That(presence.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo((int)AttachmentPoint.Chest)); | 308 | Assert.That(presence.Appearance.GetAttachpoint(attItem.ID), Is.EqualTo((int)AttachmentPoint.Chest)); |
309 | |||
310 | Assert.That(scene.GetSceneObjectGroups().Count, Is.EqualTo(1)); | ||
303 | } | 311 | } |
304 | 312 | ||
305 | [Test] | 313 | [Test] |
@@ -399,6 +407,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
399 | Assert.That(actualSceneBAtt.Name, Is.EqualTo(attItem.Name)); | 407 | Assert.That(actualSceneBAtt.Name, Is.EqualTo(attItem.Name)); |
400 | Assert.That(actualSceneBAtt.AttachmentPoint, Is.EqualTo((uint)AttachmentPoint.Chest)); | 408 | Assert.That(actualSceneBAtt.AttachmentPoint, Is.EqualTo((uint)AttachmentPoint.Chest)); |
401 | 409 | ||
410 | // Teleporting attachments should not end up in the scene graph | ||
411 | Assert.That(sceneB.GetSceneObjectGroups().Count, Is.EqualTo(1)); | ||
412 | |||
402 | // Check attachments have been removed from sceneA | 413 | // Check attachments have been removed from sceneA |
403 | ScenePresence afterTeleportSceneASp = sceneA.GetScenePresence(ua1.PrincipalID); | 414 | ScenePresence afterTeleportSceneASp = sceneA.GetScenePresence(ua1.PrincipalID); |
404 | 415 | ||
@@ -410,6 +421,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
410 | // This is the actual attachment, which should no longer exist | 421 | // This is the actual attachment, which should no longer exist |
411 | List<SceneObjectGroup> actualSceneAAttachments = afterTeleportSceneASp.GetAttachments(); | 422 | List<SceneObjectGroup> actualSceneAAttachments = afterTeleportSceneASp.GetAttachments(); |
412 | Assert.That(actualSceneAAttachments.Count, Is.EqualTo(0)); | 423 | Assert.That(actualSceneAAttachments.Count, Is.EqualTo(0)); |
424 | |||
425 | // Teleporting attachments should not end up in the scene graph | ||
426 | Assert.That(sceneA.GetSceneObjectGroups().Count, Is.EqualTo(0)); | ||
413 | } | 427 | } |
414 | 428 | ||
415 | // I'm commenting this test because scene setup NEEDS InventoryService to | 429 | // I'm commenting this test because scene setup NEEDS InventoryService to |