diff options
Diffstat (limited to 'OpenSim/Region')
10 files changed, 64 insertions, 27 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 5fb995b..f0dc238 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -546,7 +546,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
546 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, sp.UUID, "att-name", 0x10); | 546 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, sp.UUID, "att-name", 0x10); |
547 | TaskInventoryItem scriptItem | 547 | TaskInventoryItem scriptItem |
548 | = TaskInventoryHelpers.AddScript( | 548 | = TaskInventoryHelpers.AddScript( |
549 | scene, | 549 | scene.AssetService, |
550 | so.RootPart, | 550 | so.RootPart, |
551 | "scriptItem", | 551 | "scriptItem", |
552 | "default { attach(key id) { if (id != NULL_KEY) { llSay(0, \"Hello World\"); } } }"); | 552 | "default { attach(key id) { if (id != NULL_KEY) { llSay(0, \"Hello World\"); } } }"); |
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
659 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, sp.UUID, "att-name", 0x10); | 659 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, sp.UUID, "att-name", 0x10); |
660 | TaskInventoryItem scriptTaskItem | 660 | TaskInventoryItem scriptTaskItem |
661 | = TaskInventoryHelpers.AddScript( | 661 | = TaskInventoryHelpers.AddScript( |
662 | scene, | 662 | scene.AssetService, |
663 | so.RootPart, | 663 | so.RootPart, |
664 | "scriptItem", | 664 | "scriptItem", |
665 | "default { attach(key id) { if (id != NULL_KEY) { llSay(0, \"Hello World\"); } } }"); | 665 | "default { attach(key id) { if (id != NULL_KEY) { llSay(0, \"Hello World\"); } } }"); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index 9655d19..8ec6974 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Region.Framework.Tests | |||
64 | 64 | ||
65 | // Create an object embedded inside the first | 65 | // Create an object embedded inside the first |
66 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); | 66 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); |
67 | TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); | 67 | TaskInventoryHelpers.AddSceneObject(scene.AssetService, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); |
68 | 68 | ||
69 | TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); | 69 | TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); |
70 | Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); | 70 | Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); |
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Tests | |||
88 | // Create an object embedded inside the first | 88 | // Create an object embedded inside the first |
89 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); | 89 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); |
90 | TaskInventoryItem taskSceneObjectItem | 90 | TaskInventoryItem taskSceneObjectItem |
91 | = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); | 91 | = TaskInventoryHelpers.AddSceneObject(scene.AssetService, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); |
92 | 92 | ||
93 | scene.AddSceneObject(sog1); | 93 | scene.AddSceneObject(sog1); |
94 | 94 | ||
@@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Tests | |||
129 | SceneObjectPart sop1 = sog1.RootPart; | 129 | SceneObjectPart sop1 = sog1.RootPart; |
130 | TaskInventoryItem sopItem1 | 130 | TaskInventoryItem sopItem1 |
131 | = TaskInventoryHelpers.AddNotecard( | 131 | = TaskInventoryHelpers.AddNotecard( |
132 | scene, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); | 132 | scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); |
133 | 133 | ||
134 | InventoryFolderBase folder | 134 | InventoryFolderBase folder |
135 | = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0]; | 135 | = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0]; |
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Tests | |||
162 | SceneObjectPart sop1 = sog1.RootPart; | 162 | SceneObjectPart sop1 = sog1.RootPart; |
163 | TaskInventoryItem sopItem1 | 163 | TaskInventoryItem sopItem1 |
164 | = TaskInventoryHelpers.AddNotecard( | 164 | = TaskInventoryHelpers.AddNotecard( |
165 | scene, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); | 165 | scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); |
166 | 166 | ||
167 | // Perform test | 167 | // Perform test |
168 | string message; | 168 | string message; |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs index 4ae27d7..0b41039 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs | |||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
89 | { | 89 | { |
90 | TestHelpers.InMethod(); | 90 | TestHelpers.InMethod(); |
91 | // TestHelpers.EnableLogging(); | 91 | // TestHelpers.EnableLogging(); |
92 | 92 | ||
93 | UUID ownerId = TestHelpers.ParseTail(0x10); | 93 | UUID ownerId = TestHelpers.ParseTail(0x10); |
94 | UUID embeddedId = TestHelpers.ParseTail(0x20); | 94 | UUID embeddedId = TestHelpers.ParseTail(0x20); |
95 | UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); | 95 | UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); |
@@ -120,5 +120,42 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
120 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId)); | 120 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId)); |
121 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(secondLevelEmbeddedId)); | 121 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(secondLevelEmbeddedId)); |
122 | } | 122 | } |
123 | |||
124 | [Test] | ||
125 | public void TestTaskItem() | ||
126 | { | ||
127 | TestHelpers.InMethod(); | ||
128 | TestHelpers.EnableLogging(); | ||
129 | |||
130 | UUID ownerId = TestHelpers.ParseTail(0x10); | ||
131 | UUID embeddedId = TestHelpers.ParseTail(0x20); | ||
132 | UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); | ||
133 | UUID missingEmbeddedId = TestHelpers.ParseTail(0x22); | ||
134 | UUID ncAssetId = TestHelpers.ParseTail(0x30); | ||
135 | |||
136 | AssetBase ncAsset | ||
137 | = AssetHelpers.CreateNotecardAsset( | ||
138 | ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId)); | ||
139 | m_assetService.Store(ncAsset); | ||
140 | |||
141 | AssetBase embeddedAsset | ||
142 | = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId)); | ||
143 | m_assetService.Store(embeddedAsset); | ||
144 | |||
145 | AssetBase secondLevelEmbeddedAsset | ||
146 | = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when."); | ||
147 | m_assetService.Store(secondLevelEmbeddedAsset); | ||
148 | |||
149 | m_uuidGatherer.AddForInspection(ncAssetId); | ||
150 | m_uuidGatherer.GatherAll(); | ||
151 | |||
152 | // foreach (UUID key in m_uuidGatherer.GatheredUuids.Keys) | ||
153 | // System.Console.WriteLine("key : {0}", key); | ||
154 | |||
155 | Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(3)); | ||
156 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(ncAssetId)); | ||
157 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(embeddedId)); | ||
158 | Assert.That(m_uuidGatherer.GatheredUuids.ContainsKey(secondLevelEmbeddedId)); | ||
159 | } | ||
123 | } | 160 | } |
124 | } \ No newline at end of file | 161 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs index 14e45ff..e35de9c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs | |||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
100 | SceneHelpers.SetupSceneModules(m_scene, new IniConfigSource(), m_engine, m_urlModule); | 100 | SceneHelpers.SetupSceneModules(m_scene, new IniConfigSource(), m_engine, m_urlModule); |
101 | 101 | ||
102 | SceneObjectGroup so = SceneHelpers.AddSceneObject(m_scene); | 102 | SceneObjectGroup so = SceneHelpers.AddSceneObject(m_scene); |
103 | m_scriptItem = TaskInventoryHelpers.AddScript(m_scene, so.RootPart); | 103 | m_scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, so.RootPart); |
104 | 104 | ||
105 | // This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm. | 105 | // This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm. |
106 | // Possibly this could be done and we could obtain it directly from the MockScriptEngine. | 106 | // Possibly this could be done and we could obtain it directly from the MockScriptEngine. |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs index 9fd8532..3ff4c6b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
91 | 91 | ||
92 | // Create an object embedded inside the first | 92 | // Create an object embedded inside the first |
93 | UUID itemId = TestHelpers.ParseTail(0x20); | 93 | UUID itemId = TestHelpers.ParseTail(0x20); |
94 | TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, userId); | 94 | TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, userId); |
95 | 95 | ||
96 | LSL_Api api = new LSL_Api(); | 96 | LSL_Api api = new LSL_Api(); |
97 | api.Initialize(m_engine, so1.RootPart, null, null); | 97 | api.Initialize(m_engine, so1.RootPart, null, null); |
@@ -131,7 +131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
131 | 131 | ||
132 | // Create an object embedded inside the first | 132 | // Create an object embedded inside the first |
133 | UUID itemId = TestHelpers.ParseTail(0x20); | 133 | UUID itemId = TestHelpers.ParseTail(0x20); |
134 | TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, user1Id); | 134 | TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); |
135 | 135 | ||
136 | // Create a second object | 136 | // Create a second object |
137 | SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, user2Id, "so2", 0x100); | 137 | SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, user2Id, "so2", 0x100); |
@@ -188,7 +188,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
188 | 188 | ||
189 | // Create an object embedded inside the first | 189 | // Create an object embedded inside the first |
190 | UUID itemId = TestHelpers.ParseTail(0x20); | 190 | UUID itemId = TestHelpers.ParseTail(0x20); |
191 | TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, user1Id); | 191 | TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); |
192 | 192 | ||
193 | UserAccountHelpers.CreateUserWithInventory(m_scene, user2Id); | 193 | UserAccountHelpers.CreateUserWithInventory(m_scene, user2Id); |
194 | 194 | ||
@@ -223,7 +223,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
223 | // Create an object embedded inside the first | 223 | // Create an object embedded inside the first |
224 | UUID itemId = TestHelpers.ParseTail(0x20); | 224 | UUID itemId = TestHelpers.ParseTail(0x20); |
225 | TaskInventoryItem tii | 225 | TaskInventoryItem tii |
226 | = TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, user1Id); | 226 | = TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); |
227 | tii.NextPermissions &= ~((uint)PermissionMask.Modify); | 227 | tii.NextPermissions &= ~((uint)PermissionMask.Modify); |
228 | 228 | ||
229 | UserAccountHelpers.CreateUserWithInventory(m_scene, user2Id); | 229 | UserAccountHelpers.CreateUserWithInventory(m_scene, user2Id); |
@@ -251,7 +251,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
251 | m_scene.AddSceneObject(sourceSo); | 251 | m_scene.AddSceneObject(sourceSo); |
252 | LSL_Api api = new LSL_Api(); | 252 | LSL_Api api = new LSL_Api(); |
253 | api.Initialize(m_engine, sourceSo.RootPart, null, null); | 253 | api.Initialize(m_engine, sourceSo.RootPart, null, null); |
254 | TaskInventoryHelpers.AddScript(m_scene, sourceSo.RootPart, "script", "Hello World"); | 254 | TaskInventoryHelpers.AddScript(m_scene.AssetService, sourceSo.RootPart, "script", "Hello World"); |
255 | 255 | ||
256 | SceneObjectGroup targetSo = SceneHelpers.AddSceneObject(m_scene, "targetSo", user1Id); | 256 | SceneObjectGroup targetSo = SceneHelpers.AddSceneObject(m_scene, "targetSo", user1Id); |
257 | SceneObjectGroup otherOwnedTargetSo = SceneHelpers.AddSceneObject(m_scene, "otherOwnedTargetSo", user2Id); | 257 | SceneObjectGroup otherOwnedTargetSo = SceneHelpers.AddSceneObject(m_scene, "otherOwnedTargetSo", user2Id); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs index f347869..b6f5e09 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs | |||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
92 | // FIXME: This should really be a script item (with accompanying script) | 92 | // FIXME: This should really be a script item (with accompanying script) |
93 | TaskInventoryItem grp1Item | 93 | TaskInventoryItem grp1Item |
94 | = TaskInventoryHelpers.AddNotecard( | 94 | = TaskInventoryHelpers.AddNotecard( |
95 | m_scene, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); | 95 | m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); |
96 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; | 96 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; |
97 | 97 | ||
98 | SceneObjectGroup grp2 = SceneHelpers.CreateSceneObject(2, ownerId, "grp2-", 0x20); | 98 | SceneObjectGroup grp2 = SceneHelpers.CreateSceneObject(2, ownerId, "grp2-", 0x20); |
@@ -126,7 +126,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
126 | // FIXME: This should really be a script item (with accompanying script) | 126 | // FIXME: This should really be a script item (with accompanying script) |
127 | TaskInventoryItem grp1Item | 127 | TaskInventoryItem grp1Item |
128 | = TaskInventoryHelpers.AddNotecard( | 128 | = TaskInventoryHelpers.AddNotecard( |
129 | m_scene, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); | 129 | m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); |
130 | 130 | ||
131 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; | 131 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; |
132 | 132 | ||
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
155 | // FIXME: This should really be a script item (with accompanying script) | 155 | // FIXME: This should really be a script item (with accompanying script) |
156 | TaskInventoryItem grp1Item | 156 | TaskInventoryItem grp1Item |
157 | = TaskInventoryHelpers.AddNotecard( | 157 | = TaskInventoryHelpers.AddNotecard( |
158 | m_scene, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); | 158 | m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); |
159 | 159 | ||
160 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; | 160 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; |
161 | 161 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs index b9028ab..2ac12cb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
61 | SceneHelpers.SetupSceneModules(m_scene, new IniConfigSource(), m_engine); | 61 | SceneHelpers.SetupSceneModules(m_scene, new IniConfigSource(), m_engine); |
62 | 62 | ||
63 | m_so = SceneHelpers.AddSceneObject(m_scene); | 63 | m_so = SceneHelpers.AddSceneObject(m_scene); |
64 | m_scriptItem = TaskInventoryHelpers.AddScript(m_scene, m_so.RootPart); | 64 | m_scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, m_so.RootPart); |
65 | 65 | ||
66 | // This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm. | 66 | // This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm. |
67 | // Possibly this could be done and we could obtain it directly from the MockScriptEngine. | 67 | // Possibly this could be done and we could obtain it directly from the MockScriptEngine. |
@@ -77,7 +77,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
77 | string[] ncLines = { "One", "Twoè", "Three" }; | 77 | string[] ncLines = { "One", "Twoè", "Three" }; |
78 | 78 | ||
79 | TaskInventoryItem ncItem | 79 | TaskInventoryItem ncItem |
80 | = TaskInventoryHelpers.AddNotecard(m_scene, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines)); | 80 | = TaskInventoryHelpers.AddNotecard(m_scene.AssetService, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines)); |
81 | 81 | ||
82 | AssertValidNotecardLine(ncItem.Name, 0, ncLines[0]); | 82 | AssertValidNotecardLine(ncItem.Name, 0, ncLines[0]); |
83 | AssertValidNotecardLine(ncItem.Name, 2, ncLines[2]); | 83 | AssertValidNotecardLine(ncItem.Name, 2, ncLines[2]); |
@@ -102,7 +102,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
102 | { | 102 | { |
103 | TestHelpers.InMethod(); | 103 | TestHelpers.InMethod(); |
104 | 104 | ||
105 | TaskInventoryItem ncItem = TaskInventoryHelpers.AddScript(m_scene, m_so.RootPart, "nc1", "Not important"); | 105 | TaskInventoryItem ncItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, m_so.RootPart, "nc1", "Not important"); |
106 | 106 | ||
107 | AssertInValidNotecardLine(ncItem.Name, 0); | 107 | AssertInValidNotecardLine(ncItem.Name, 0); |
108 | } | 108 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs index 6424ea1..40082b5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
68 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, userId); | 68 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, userId); |
69 | 69 | ||
70 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; | 70 | SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; |
71 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, part); | 71 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, part); |
72 | 72 | ||
73 | LSL_Api apiGrp1 = new LSL_Api(); | 73 | LSL_Api apiGrp1 = new LSL_Api(); |
74 | apiGrp1.Initialize(m_engine, part, scriptItem, null); | 74 | apiGrp1.Initialize(m_engine, part, scriptItem, null); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs index caba4a4..2fe558a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs | |||
@@ -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, null); | 101 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
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, null); | 147 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
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), "Hello World!"); | 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,7 +190,7 @@ 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, null); | 195 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
196 | OSSL_Api osslApi = new OSSL_Api(); | 196 | OSSL_Api osslApi = new OSSL_Api(); |
@@ -198,7 +198,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
198 | 198 | ||
199 | // Create an object embedded inside the first | 199 | // Create an object embedded inside the first |
200 | TaskInventoryHelpers.AddSceneObject( | 200 | TaskInventoryHelpers.AddSceneObject( |
201 | m_scene, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); | 201 | m_scene.AssetService, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); |
202 | 202 | ||
203 | ScenePresence sp2 = SceneHelpers.AddScenePresence(m_scene, ua2); | 203 | ScenePresence sp2 = SceneHelpers.AddScenePresence(m_scene, ua2); |
204 | 204 | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEnginePersistenceTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEnginePersistenceTests.cs index 5b7e5f7..2ef4058 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEnginePersistenceTests.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEnginePersistenceTests.cs | |||
@@ -114,7 +114,7 @@ namespace OpenSim.Region.ScriptEngine.Tests | |||
114 | 114 | ||
115 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, sp.UUID, "att-name", 0x10); | 115 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, sp.UUID, "att-name", 0x10); |
116 | TaskInventoryHelpers.AddScript( | 116 | TaskInventoryHelpers.AddScript( |
117 | scene, | 117 | scene.AssetService, |
118 | so.RootPart, | 118 | so.RootPart, |
119 | "scriptItem", | 119 | "scriptItem", |
120 | "default { attach(key id) { if (id != NULL_KEY) { llSay(0, \"Hello World\"); } } }"); | 120 | "default { attach(key id) { if (id != NULL_KEY) { llSay(0, \"Hello World\"); } } }"); |