From bd5d35ee323df9b15d5303c2dcad7e29a4f3e0eb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 17 Aug 2011 00:42:58 +0100 Subject: extend test to check that there is one attachment and that it has the right name --- .../CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 8c79ab4..5bac4c6 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs @@ -122,11 +122,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests UUID userId = TestHelpers.ParseTail(0x1); UUID attItemId = TestHelpers.ParseTail(0x2); UUID attAssetId = TestHelpers.ParseTail(0x3); + string attName = "att"; UserAccountHelpers.CreateUserWithInventory(scene, userId); InventoryItemBase attItem = UserInventoryHelpers.CreateInventoryItem( - scene, "att", attItemId, attAssetId, userId, InventoryType.Object); + scene, attName, attItemId, attAssetId, userId, InventoryType.Object); AgentCircuitData acd = SceneHelpers.GenerateAgentData(userId); acd.Appearance = new AvatarAppearance(); @@ -134,6 +135,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests ScenePresence presence = SceneHelpers.AddScenePresence(scene, acd); Assert.That(presence.HasAttachments(), Is.True); + List attachments = presence.Attachments; + + Assert.That(attachments.Count, Is.EqualTo(1)); + Assert.That(attachments[0].Name, Is.EqualTo(attName)); } // I'm commenting this test because scene setup NEEDS InventoryService to -- cgit v1.1