aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common')
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs23
-rw-r--r--OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs12
2 files changed, 29 insertions, 6 deletions
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index a25eb66..aa904aa 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -88,9 +88,27 @@ namespace OpenSim.Tests.Common
88 /// <param name="id">ID of the region</param> 88 /// <param name="id">ID of the region</param>
89 /// <param name="x">X co-ordinate of the region</param> 89 /// <param name="x">X co-ordinate of the region</param>
90 /// <param name="y">Y co-ordinate of the region</param> 90 /// <param name="y">Y co-ordinate of the region</param>
91 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> 91 /// <param name="cache"></param>
92 /// <returns></returns> 92 /// <returns></returns>
93 public static TestScene SetupScene(string name, UUID id, uint x, uint y, CoreAssetCache cache) 93 public static TestScene SetupScene(
94 string name, UUID id, uint x, uint y, CoreAssetCache cache)
95 {
96 return SetupScene(name, id, x, y, cache, new IniConfigSource());
97 }
98
99 /// <summary>
100 /// Set up a scene. If it's more then one scene, use the same CommunicationsManager to link regions
101 /// or a different, to get a brand new scene with new shared region modules.
102 /// </summary>
103 /// <param name="name">Name of the region</param>
104 /// <param name="id">ID of the region</param>
105 /// <param name="x">X co-ordinate of the region</param>
106 /// <param name="y">Y co-ordinate of the region</param>
107 /// <param name="cache"></param>
108 /// <param name="configSource"></param>
109 /// <returns></returns>
110 public static TestScene SetupScene(
111 string name, UUID id, uint x, uint y, CoreAssetCache cache, IConfigSource configSource)
94 { 112 {
95 Console.WriteLine("Setting up test scene {0}", name); 113 Console.WriteLine("Setting up test scene {0}", name);
96 114
@@ -106,7 +124,6 @@ namespace OpenSim.Tests.Common
106 124
107 ISimulationDataService simDataService = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); 125 ISimulationDataService simDataService = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null);
108 IEstateDataService estateDataService = null; 126 IEstateDataService estateDataService = null;
109 IConfigSource configSource = new IniConfigSource();
110 127
111 TestScene testScene = new TestScene( 128 TestScene testScene = new TestScene(
112 regInfo, acm, scs, simDataService, estateDataService, null, false, configSource, null); 129 regInfo, acm, scs, simDataService, estateDataService, null, false, configSource, null);
diff --git a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
index a8f0d59..7058d1e 100644
--- a/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/TaskInventoryHelpers.cs
@@ -72,15 +72,21 @@ namespace OpenSim.Tests.Common
72 /// <param name="sop"></param> 72 /// <param name="sop"></param>
73 /// <param name="itemName"></param> 73 /// <param name="itemName"></param>
74 /// <param name="id"></param> 74 /// <param name="id"></param>
75 public static TaskInventoryItem AddSceneObject(Scene scene, SceneObjectPart sop, string itemName, UUID id) 75 /// <param name="userId"></param>
76 public static TaskInventoryItem AddSceneObject(
77 Scene scene, SceneObjectPart sop, string itemName, UUID id, UUID userId)
76 { 78 {
77 SceneObjectGroup taskSceneObject = SceneHelpers.CreateSceneObject(1, UUID.Zero); 79 SceneObjectGroup taskSceneObject = SceneHelpers.CreateSceneObject(1, UUID.Zero);
78 AssetBase taskSceneObjectAsset = AssetHelpers.CreateAsset(0x10, taskSceneObject); 80 AssetBase taskSceneObjectAsset = AssetHelpers.CreateAsset(0x10, taskSceneObject);
79 scene.AssetService.Store(taskSceneObjectAsset); 81 scene.AssetService.Store(taskSceneObjectAsset);
80 TaskInventoryItem taskSceneObjectItem 82 TaskInventoryItem taskSceneObjectItem
81 = new TaskInventoryItem 83 = new TaskInventoryItem
82 { Name = itemName, AssetID = taskSceneObjectAsset.FullID, ItemID = id, 84 { Name = itemName,
83 Type = (int)AssetType.Object, InvType = (int)InventoryType.Object }; 85 AssetID = taskSceneObjectAsset.FullID,
86 ItemID = id,
87 OwnerID = userId,
88 Type = (int)AssetType.Object,
89 InvType = (int)InventoryType.Object };
84 sop.Inventory.AddInventoryItem(taskSceneObjectItem, true); 90 sop.Inventory.AddInventoryItem(taskSceneObjectItem, true);
85 91
86 return taskSceneObjectItem; 92 return taskSceneObjectItem;