diff options
author | Justin Clark-Casey (justincc) | 2011-08-24 21:07:46 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-24 21:07:46 +0100 |
commit | b9ec625dbf99955c983b75651430785217559483 (patch) | |
tree | e99bc07c7068ac7113e79322a074997654ca6f4d /OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |
parent | Fix llAttachToAvatar() (diff) | |
download | opensim-SC_OLD-b9ec625dbf99955c983b75651430785217559483.zip opensim-SC_OLD-b9ec625dbf99955c983b75651430785217559483.tar.gz opensim-SC_OLD-b9ec625dbf99955c983b75651430785217559483.tar.bz2 opensim-SC_OLD-b9ec625dbf99955c983b75651430785217559483.tar.xz |
add TestAddAttachmentFromGround() regression test
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 6695a9d..b4ff055 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -81,7 +81,37 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
81 | } | 81 | } |
82 | 82 | ||
83 | [Test] | 83 | [Test] |
84 | public void TestAddAttachment() | 84 | public void TestAddAttachmentFromGround() |
85 | { | ||
86 | TestHelpers.InMethod(); | ||
87 | // log4net.Config.XmlConfigurator.Configure(); | ||
88 | |||
89 | UUID userId = TestHelpers.ParseTail(0x1); | ||
90 | string attName = "att"; | ||
91 | |||
92 | UserAccountHelpers.CreateUserWithInventory(scene, userId); | ||
93 | ScenePresence presence = SceneHelpers.AddScenePresence(scene, userId); | ||
94 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, attName).ParentGroup; | ||
95 | |||
96 | m_attMod.AttachObject(presence.ControllingClient, so, (uint)AttachmentPoint.Chest, false); | ||
97 | |||
98 | SceneObjectGroup attSo = scene.GetSceneObjectGroup(so.UUID); | ||
99 | Assert.That(attSo.IsAttachment); | ||
100 | |||
101 | // Check status on scene presence | ||
102 | Assert.That(presence.HasAttachments(), Is.True); | ||
103 | List<SceneObjectGroup> attachments = presence.Attachments; | ||
104 | Assert.That(attachments.Count, Is.EqualTo(1)); | ||
105 | Assert.That(attachments[0].Name, Is.EqualTo(attName)); | ||
106 | Assert.That(attachments[0].GetAttachmentPoint(), Is.EqualTo((byte)AttachmentPoint.Chest)); | ||
107 | |||
108 | // Check item status | ||
109 | Assert.That(presence.Appearance.GetAttachpoint( | ||
110 | attSo.GetFromItemID()), Is.EqualTo((int)AttachmentPoint.Chest)); | ||
111 | } | ||
112 | |||
113 | [Test] | ||
114 | public void TestAddAttachmentFromInventory() | ||
85 | { | 115 | { |
86 | TestHelpers.InMethod(); | 116 | TestHelpers.InMethod(); |
87 | // log4net.Config.XmlConfigurator.Configure(); | 117 | // log4net.Config.XmlConfigurator.Configure(); |