diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs index 5ed1f3d..b6b3f12 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs | |||
@@ -41,9 +41,9 @@ using OpenSim.Region.CoreModules.Framework.InventoryAccess; | |||
41 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
42 | using OpenSim.Region.ScriptEngine.Shared; | 42 | using OpenSim.Region.ScriptEngine.Shared; |
43 | using OpenSim.Region.ScriptEngine.Shared.Api; | 43 | using OpenSim.Region.ScriptEngine.Shared.Api; |
44 | using OpenSim.Region.ScriptEngine.Shared.Instance; | ||
44 | using OpenSim.Services.Interfaces; | 45 | using OpenSim.Services.Interfaces; |
45 | using OpenSim.Tests.Common; | 46 | using OpenSim.Tests.Common; |
46 | using OpenSim.Tests.Common.Mock; | ||
47 | 47 | ||
48 | namespace OpenSim.Region.ScriptEngine.Shared.Tests | 48 | namespace OpenSim.Region.ScriptEngine.Shared.Tests |
49 | { | 49 | { |
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
96 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, 0x1); | 96 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, 0x1); |
97 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1.PrincipalID); | 97 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1.PrincipalID); |
98 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); | 98 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); |
99 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); | 99 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); |
100 | 100 | ||
101 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); | 101 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); |
102 | OSSL_Api osslApi = new OSSL_Api(); | 102 | OSSL_Api osslApi = new OSSL_Api(); |
@@ -105,7 +105,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
105 | // SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, ua1.PrincipalID); | 105 | // SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, ua1.PrincipalID); |
106 | 106 | ||
107 | // Create an object embedded inside the first | 107 | // Create an object embedded inside the first |
108 | TaskInventoryHelpers.AddSceneObject(m_scene, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); | 108 | TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); |
109 | 109 | ||
110 | osslApi.osForceAttachToAvatarFromInventory(taskInvObjItemName, (int)attachPoint); | 110 | osslApi.osForceAttachToAvatarFromInventory(taskInvObjItemName, (int)attachPoint); |
111 | 111 | ||
@@ -142,7 +142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
142 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, 0x1); | 142 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, 0x1); |
143 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1.PrincipalID); | 143 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1.PrincipalID); |
144 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); | 144 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); |
145 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); | 145 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); |
146 | 146 | ||
147 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); | 147 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); |
148 | OSSL_Api osslApi = new OSSL_Api(); | 148 | OSSL_Api osslApi = new OSSL_Api(); |
@@ -150,7 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
150 | 150 | ||
151 | // Create an object embedded inside the first | 151 | // Create an object embedded inside the first |
152 | TaskInventoryHelpers.AddNotecard( | 152 | TaskInventoryHelpers.AddNotecard( |
153 | m_scene, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, TestHelpers.ParseTail(0x900)); | 153 | m_scene.AssetService, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, TestHelpers.ParseTail(0x900), "Hello World!"); |
154 | 154 | ||
155 | bool exceptionCaught = false; | 155 | bool exceptionCaught = false; |
156 | 156 | ||
@@ -190,14 +190,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
190 | 190 | ||
191 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1); | 191 | ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1); |
192 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); | 192 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); |
193 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); | 193 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); |
194 | 194 | ||
195 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); | 195 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); |
196 | OSSL_Api osslApi = new OSSL_Api(); | 196 | OSSL_Api osslApi = new OSSL_Api(); |
197 | osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem); | 197 | osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem); |
198 | 198 | ||
199 | // Create an object embedded inside the first | 199 | // Create an object embedded inside the first |
200 | TaskInventoryHelpers.AddSceneObject(m_scene, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); | 200 | TaskInventoryHelpers.AddSceneObject( |
201 | m_scene.AssetService, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); | ||
201 | 202 | ||
202 | ScenePresence sp2 = SceneHelpers.AddScenePresence(m_scene, ua2); | 203 | ScenePresence sp2 = SceneHelpers.AddScenePresence(m_scene, ua2); |
203 | 204 | ||
@@ -228,4 +229,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
228 | Assert.That(sp2.Appearance.GetAttachpoint(attachmentsInAppearance2[0].ItemID), Is.EqualTo((uint)attachPoint)); | 229 | Assert.That(sp2.Appearance.GetAttachpoint(attachmentsInAppearance2[0].ItemID), Is.EqualTo((uint)attachPoint)); |
229 | } | 230 | } |
230 | } | 231 | } |
231 | } \ No newline at end of file | 232 | } |