aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r--OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs45
1 files changed, 33 insertions, 12 deletions
diff --git a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
index a15127e..3a3b33a 100644
--- a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
@@ -153,7 +153,6 @@ namespace OpenSim.Tests.Common
153 return item; 153 return item;
154 } 154 }
155 155
156
157 /// <summary> 156 /// <summary>
158 /// Add a scene object item to the given part. 157 /// Add a scene object item to the given part.
159 /// </summary> 158 /// </summary>
@@ -165,25 +164,47 @@ namespace OpenSim.Tests.Common
165 /// <param name="assetService"></param> 164 /// <param name="assetService"></param>
166 /// <param name="sop"></param> 165 /// <param name="sop"></param>
167 /// <param name="itemName"></param> 166 /// <param name="itemName"></param>
168 /// <param name="id"></param> 167 /// <param name="itemId"></param>
169 /// <param name="userId"></param> 168 /// <param name="soToAdd"></param>
169 /// <param name="soAssetId"></param>
170 public static TaskInventoryItem AddSceneObject( 170 public static TaskInventoryItem AddSceneObject(
171 IAssetService assetService, SceneObjectPart sop, string itemName, UUID id, UUID userId) 171 IAssetService assetService, SceneObjectPart sop, string itemName, UUID itemId, SceneObjectGroup soToAdd, UUID soAssetId)
172 { 172 {
173 SceneObjectGroup taskSceneObject = SceneHelpers.CreateSceneObject(1, UUID.Zero); 173 AssetBase taskSceneObjectAsset = AssetHelpers.CreateAsset(soAssetId, soToAdd);
174 AssetBase taskSceneObjectAsset = AssetHelpers.CreateAsset(0x10, taskSceneObject);
175 assetService.Store(taskSceneObjectAsset); 174 assetService.Store(taskSceneObjectAsset);
176 TaskInventoryItem taskSceneObjectItem 175 TaskInventoryItem taskSceneObjectItem
177 = new TaskInventoryItem 176 = new TaskInventoryItem
178 { Name = itemName, 177 { Name = itemName,
179 AssetID = taskSceneObjectAsset.FullID, 178 AssetID = taskSceneObjectAsset.FullID,
180 ItemID = id, 179 ItemID = itemId,
181 OwnerID = userId, 180 OwnerID = soToAdd.OwnerID,
182 Type = (int)AssetType.Object, 181 Type = (int)AssetType.Object,
183 InvType = (int)InventoryType.Object }; 182 InvType = (int)InventoryType.Object };
184 sop.Inventory.AddInventoryItem(taskSceneObjectItem, true); 183 sop.Inventory.AddInventoryItem(taskSceneObjectItem, true);
185 184
186 return taskSceneObjectItem; 185 return taskSceneObjectItem;
187 } 186 }
187
188 /// <summary>
189 /// Add a scene object item to the given part.
190 /// </summary>
191 /// <remarks>
192 /// TODO: Accept input for item and asset IDs to avoid mysterious script failures that try to use any of these
193 /// functions more than once in a test.
194 /// </remarks>
195 ///
196 /// <param name="assetService"></param>
197 /// <param name="sop"></param>
198 /// <param name="itemName"></param>
199 /// <param name="id"></param>
200 /// <param name="userId"></param>
201 public static TaskInventoryItem AddSceneObject(
202 IAssetService assetService, SceneObjectPart sop, string itemName, UUID itemId, UUID userId)
203 {
204 SceneObjectGroup taskSceneObject = SceneHelpers.CreateSceneObject(1, userId);
205
206 return TaskInventoryHelpers.AddSceneObject(
207 assetService, sop, itemName, itemId, taskSceneObject, TestHelpers.ParseTail(0x10));
208 }
188 } 209 }
189} \ No newline at end of file 210} \ No newline at end of file