aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Setup
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Setup')
-rw-r--r--OpenSim/Tests/Common/Setup/TaskInventoryHelpers.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Tests/Common/Setup/TaskInventoryHelpers.cs b/OpenSim/Tests/Common/Setup/TaskInventoryHelpers.cs
index 48724f4..4467573 100644
--- a/OpenSim/Tests/Common/Setup/TaskInventoryHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/TaskInventoryHelpers.cs
@@ -32,7 +32,7 @@ using OpenSim.Framework;
32using OpenSim.Region.Framework.Scenes; 32using OpenSim.Region.Framework.Scenes;
33using OpenSim.Services.Interfaces; 33using OpenSim.Services.Interfaces;
34 34
35namespace OpenSim.Tests.Common 35namespace OpenSim.Tests.Common.Setup
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// Utility functions for carrying out task inventory tests. 38 /// Utility functions for carrying out task inventory tests.
@@ -64,5 +64,26 @@ namespace OpenSim.Tests.Common
64 64
65 return ncItem; 65 return ncItem;
66 } 66 }
67
68 /// <summary>
69 /// Add a scene object item to the given part.
70 /// </summary>
71 /// <param name="scene"></param>
72 /// <param name="sop"></param>
73 /// <param name="itemName"></param>
74 /// <param name="id"></param>
75 public static TaskInventoryItem AddSceneObjectItem(Scene scene, SceneObjectPart sop, string itemName, UUID id)
76 {
77 SceneObjectGroup taskSceneObject = SceneSetupHelpers.CreateSceneObject(1, UUID.Zero);
78 AssetBase taskSceneObjectAsset = AssetHelpers.CreateAsset(0x10, taskSceneObject);
79 scene.AssetService.Store(taskSceneObjectAsset);
80 TaskInventoryItem taskSceneObjectItem
81 = new TaskInventoryItem
82 { Name = itemName, AssetID = taskSceneObjectAsset.FullID, ItemID = id,
83 Type = (int)AssetType.Object, InvType = (int)InventoryType.Object };
84 sop.Inventory.AddInventoryItem(taskSceneObjectItem, true);
85
86 return taskSceneObjectItem;
87 }
67 } 88 }
68} \ No newline at end of file 89} \ No newline at end of file