aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Helpers/SceneHelpers.cs')
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs66
1 files changed, 33 insertions, 33 deletions
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index f8485e0..fbd7e90 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -102,7 +102,7 @@ namespace OpenSim.Tests.Common
102 102
103 m_physicsScene = StartPhysicsScene(); 103 m_physicsScene = StartPhysicsScene();
104 104
105 SimDataService 105 SimDataService
106 = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); 106 = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null);
107 } 107 }
108 108
@@ -146,7 +146,7 @@ namespace OpenSim.Tests.Common
146 146
147 // We must set up a console otherwise setup of some modules may fail 147 // We must set up a console otherwise setup of some modules may fail
148 MainConsole.Instance = new MockConsole(); 148 MainConsole.Instance = new MockConsole();
149 149
150 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1"); 150 RegionInfo regInfo = new RegionInfo(x, y, new IPEndPoint(IPAddress.Loopback, 9000), "127.0.0.1");
151 regInfo.RegionName = name; 151 regInfo.RegionName = name;
152 regInfo.RegionID = id; 152 regInfo.RegionID = id;
@@ -199,13 +199,13 @@ namespace OpenSim.Tests.Common
199 m_presenceService.AddRegion(testScene); 199 m_presenceService.AddRegion(testScene);
200 m_presenceService.RegionLoaded(testScene); 200 m_presenceService.RegionLoaded(testScene);
201 testScene.AddRegionModule(m_presenceService.Name, m_presenceService); 201 testScene.AddRegionModule(m_presenceService.Name, m_presenceService);
202 202
203 203
204 testScene.SetModuleInterfaces(); 204 testScene.SetModuleInterfaces();
205 205
206 testScene.LandChannel = new TestLandChannel(testScene); 206 testScene.LandChannel = new TestLandChannel(testScene);
207 testScene.LoadWorldMap(); 207 testScene.LoadWorldMap();
208 208
209 testScene.LoginsEnabled = true; 209 testScene.LoginsEnabled = true;
210 testScene.RegisterRegionWithGrid(); 210 testScene.RegisterRegionWithGrid();
211 211
@@ -217,10 +217,10 @@ namespace OpenSim.Tests.Common
217 private static LocalAssetServicesConnector StartAssetService(CoreAssetCache cache) 217 private static LocalAssetServicesConnector StartAssetService(CoreAssetCache cache)
218 { 218 {
219 IConfigSource config = new IniConfigSource(); 219 IConfigSource config = new IniConfigSource();
220 config.AddConfig("Modules"); 220 config.AddConfig("Modules");
221 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector"); 221 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
222 config.AddConfig("AssetService"); 222 config.AddConfig("AssetService");
223 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService"); 223 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
224 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 224 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
225 225
226 LocalAssetServicesConnector assetService = new LocalAssetServicesConnector(); 226 LocalAssetServicesConnector assetService = new LocalAssetServicesConnector();
@@ -235,7 +235,7 @@ namespace OpenSim.Tests.Common
235 235
236 cache.Initialise(cacheConfig); 236 cache.Initialise(cacheConfig);
237 } 237 }
238 238
239 return assetService; 239 return assetService;
240 } 240 }
241 241
@@ -257,7 +257,7 @@ namespace OpenSim.Tests.Common
257 257
258 private static LocalInventoryServicesConnector StartInventoryService() 258 private static LocalInventoryServicesConnector StartInventoryService()
259 { 259 {
260 IConfigSource config = new IniConfigSource(); 260 IConfigSource config = new IniConfigSource();
261 config.AddConfig("Modules"); 261 config.AddConfig("Modules");
262 config.AddConfig("InventoryService"); 262 config.AddConfig("InventoryService");
263 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); 263 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
@@ -266,8 +266,8 @@ namespace OpenSim.Tests.Common
266 266
267 LocalInventoryServicesConnector inventoryService = new LocalInventoryServicesConnector(); 267 LocalInventoryServicesConnector inventoryService = new LocalInventoryServicesConnector();
268 inventoryService.Initialise(config); 268 inventoryService.Initialise(config);
269 269
270 return inventoryService; 270 return inventoryService;
271 } 271 }
272 272
273 private static LocalGridServicesConnector StartGridService() 273 private static LocalGridServicesConnector StartGridService()
@@ -282,7 +282,7 @@ namespace OpenSim.Tests.Common
282 282
283 LocalGridServicesConnector gridService = new LocalGridServicesConnector(); 283 LocalGridServicesConnector gridService = new LocalGridServicesConnector();
284 gridService.Initialise(config); 284 gridService.Initialise(config);
285 285
286 return gridService; 286 return gridService;
287 } 287 }
288 288
@@ -303,7 +303,7 @@ namespace OpenSim.Tests.Common
303 303
304 LocalUserAccountServicesConnector userAccountService = new LocalUserAccountServicesConnector(); 304 LocalUserAccountServicesConnector userAccountService = new LocalUserAccountServicesConnector();
305 userAccountService.Initialise(config); 305 userAccountService.Initialise(config);
306 306
307 return userAccountService; 307 return userAccountService;
308 } 308 }
309 309
@@ -328,7 +328,7 @@ namespace OpenSim.Tests.Common
328 328
329 LocalPresenceServicesConnector presenceService = new LocalPresenceServicesConnector(); 329 LocalPresenceServicesConnector presenceService = new LocalPresenceServicesConnector();
330 presenceService.Initialise(config); 330 presenceService.Initialise(config);
331 331
332 return presenceService; 332 return presenceService;
333 } 333 }
334 334
@@ -384,8 +384,8 @@ namespace OpenSim.Tests.Common
384 /// </summary> 384 /// </summary>
385 /// <remarks> 385 /// <remarks>
386 /// If called directly, then all the modules must be shared modules. 386 /// If called directly, then all the modules must be shared modules.
387 /// 387 ///
388 /// We are emulating here the normal calls made to setup region modules 388 /// We are emulating here the normal calls made to setup region modules
389 /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()). 389 /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()).
390 /// TODO: Need to reuse normal runtime module code. 390 /// TODO: Need to reuse normal runtime module code.
391 /// </remarks> 391 /// </remarks>
@@ -655,7 +655,7 @@ namespace OpenSim.Tests.Common
655 655
656 return so; 656 return so;
657 } 657 }
658 658
659 /// <summary> 659 /// <summary>
660 /// Create a scene object part. 660 /// Create a scene object part.
661 /// </summary> 661 /// </summary>
@@ -664,10 +664,10 @@ namespace OpenSim.Tests.Common
664 /// <param name="ownerId"></param> 664 /// <param name="ownerId"></param>
665 /// <returns></returns> 665 /// <returns></returns>
666 public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId) 666 public static SceneObjectPart CreateSceneObjectPart(string name, UUID id, UUID ownerId)
667 { 667 {
668 return new SceneObjectPart( 668 return new SceneObjectPart(
669 ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 669 ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
670 { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) }; 670 { Name = name, UUID = id, Scale = new Vector3(1, 1, 1) };
671 } 671 }
672 672
673 /// <summary> 673 /// <summary>
@@ -682,10 +682,10 @@ namespace OpenSim.Tests.Common
682 /// <param name="ownerId"></param> 682 /// <param name="ownerId"></param>
683 /// <returns></returns> 683 /// <returns></returns>
684 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId) 684 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId)
685 { 685 {
686 return CreateSceneObject(parts, ownerId, 0x1); 686 return CreateSceneObject(parts, ownerId, 0x1);
687 } 687 }
688 688
689 /// <summary> 689 /// <summary>
690 /// Create a scene object but do not add it to the scene. 690 /// Create a scene object but do not add it to the scene.
691 /// </summary> 691 /// </summary>
@@ -697,10 +697,10 @@ namespace OpenSim.Tests.Common
697 /// </param> 697 /// </param>
698 /// <returns></returns> 698 /// <returns></returns>
699 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail) 699 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, int uuidTail)
700 { 700 {
701 return CreateSceneObject(parts, ownerId, "", uuidTail); 701 return CreateSceneObject(parts, ownerId, "", uuidTail);
702 } 702 }
703 703
704 /// <summary> 704 /// <summary>
705 /// Create a scene object but do not add it to the scene. 705 /// Create a scene object but do not add it to the scene.
706 /// </summary> 706 /// </summary>
@@ -718,22 +718,22 @@ namespace OpenSim.Tests.Common
718 /// </param> 718 /// </param>
719 /// <returns></returns> 719 /// <returns></returns>
720 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, string partNamePrefix, int uuidTail) 720 public static SceneObjectGroup CreateSceneObject(int parts, UUID ownerId, string partNamePrefix, int uuidTail)
721 { 721 {
722 string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail); 722 string rawSogId = string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail);
723 723
724 SceneObjectGroup sog 724 SceneObjectGroup sog
725 = new SceneObjectGroup( 725 = new SceneObjectGroup(
726 CreateSceneObjectPart(string.Format("{0}Part1", partNamePrefix), new UUID(rawSogId), ownerId)); 726 CreateSceneObjectPart(string.Format("{0}Part1", partNamePrefix), new UUID(rawSogId), ownerId));
727 727
728 if (parts > 1) 728 if (parts > 1)
729 for (int i = 2; i <= parts; i++) 729 for (int i = 2; i <= parts; i++)
730 sog.AddPart( 730 sog.AddPart(
731 CreateSceneObjectPart( 731 CreateSceneObjectPart(
732 string.Format("{0}Part{1}", partNamePrefix, i), 732 string.Format("{0}Part{1}", partNamePrefix, i),
733 new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i - 1)), 733 new UUID(string.Format("00000000-0000-0000-0000-{0:X12}", uuidTail + i - 1)),
734 ownerId)); 734 ownerId));
735 735
736 return sog; 736 return sog;
737 } 737 }
738 } 738 }
739} 739}