aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
diff options
context:
space:
mode:
authorJeff Ames2010-09-12 13:43:49 -0400
committerJeff Ames2010-09-12 13:43:49 -0400
commitf1f0bc23f4501ba99035283d3407ddad2b21b785 (patch)
tree2b62a244eddf18f5608405abcefa9f763ab54340 /OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
parentAdd copyright headers. (diff)
downloadopensim-SC_OLD-f1f0bc23f4501ba99035283d3407ddad2b21b785.zip
opensim-SC_OLD-f1f0bc23f4501ba99035283d3407ddad2b21b785.tar.gz
opensim-SC_OLD-f1f0bc23f4501ba99035283d3407ddad2b21b785.tar.bz2
opensim-SC_OLD-f1f0bc23f4501ba99035283d3407ddad2b21b785.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs')
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs37
1 files changed, 18 insertions, 19 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index 9318a27..889389b 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Tests.Common.Setup
58 public class SceneSetupHelpers 58 public class SceneSetupHelpers
59 { 59 {
60 // These static variables in order to allow regions to be linked by shared modules and same 60 // These static variables in order to allow regions to be linked by shared modules and same
61 // CommunicationsManager. 61 // CommunicationsManager.
62 private static ISharedRegionModule m_assetService = null; 62 private static ISharedRegionModule m_assetService = null;
63// private static ISharedRegionModule m_authenticationService = null; 63// private static ISharedRegionModule m_authenticationService = null;
64 private static ISharedRegionModule m_inventoryService = null; 64 private static ISharedRegionModule m_inventoryService = null;
@@ -69,19 +69,19 @@ namespace OpenSim.Tests.Common.Setup
69 /// <summary> 69 /// <summary>
70 /// Set up a test scene 70 /// Set up a test scene
71 /// </summary> 71 /// </summary>
72 /// 72 ///
73 /// Automatically starts service threads, as would the normal runtime. 73 /// Automatically starts service threads, as would the normal runtime.
74 /// 74 ///
75 /// <returns></returns> 75 /// <returns></returns>
76 public static TestScene SetupScene() 76 public static TestScene SetupScene()
77 { 77 {
78 return SetupScene(""); 78 return SetupScene("");
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// Set up a test scene 82 /// Set up a test scene
83 /// </summary> 83 /// </summary>
84 /// 84 ///
85 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> 85 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
86 /// <returns></returns> 86 /// <returns></returns>
87 public static TestScene SetupScene(String realServices) 87 public static TestScene SetupScene(String realServices)
@@ -94,7 +94,7 @@ namespace OpenSim.Tests.Common.Setup
94 ///// <summary> 94 ///// <summary>
95 ///// Set up a test scene 95 ///// Set up a test scene
96 ///// </summary> 96 ///// </summary>
97 ///// 97 /////
98 ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> 98 ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
99 ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param> 99 ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
100 ///// <returns></returns> 100 ///// <returns></returns>
@@ -167,13 +167,13 @@ namespace OpenSim.Tests.Common.Setup
167 capsModule.Initialise(new IniConfigSource()); 167 capsModule.Initialise(new IniConfigSource());
168 testScene.AddRegionModule(capsModule.Name, capsModule); 168 testScene.AddRegionModule(capsModule.Name, capsModule);
169 capsModule.AddRegion(testScene); 169 capsModule.AddRegion(testScene);
170 170
171 IRegionModule godsModule = new GodsModule(); 171 IRegionModule godsModule = new GodsModule();
172 godsModule.Initialise(testScene, new IniConfigSource()); 172 godsModule.Initialise(testScene, new IniConfigSource());
173 testScene.AddModule(godsModule.Name, godsModule); 173 testScene.AddModule(godsModule.Name, godsModule);
174 realServices = realServices.ToLower(); 174 realServices = realServices.ToLower();
175 // IConfigSource config = new IniConfigSource(); 175 // IConfigSource config = new IniConfigSource();
176 176
177 // If we have a brand new scene, need to initialize shared region modules 177 // If we have a brand new scene, need to initialize shared region modules
178 if ((m_assetService == null && m_inventoryService == null) || newScene) 178 if ((m_assetService == null && m_inventoryService == null) || newScene)
179 { 179 {
@@ -184,13 +184,13 @@ namespace OpenSim.Tests.Common.Setup
184 184
185 // For now, always started a 'real' authentication service 185 // For now, always started a 'real' authentication service
186 StartAuthenticationService(testScene, true); 186 StartAuthenticationService(testScene, true);
187 187
188 if (realServices.Contains("inventory")) 188 if (realServices.Contains("inventory"))
189 StartInventoryService(testScene, true); 189 StartInventoryService(testScene, true);
190 else 190 else
191 StartInventoryService(testScene, false); 191 StartInventoryService(testScene, false);
192 192
193 StartGridService(testScene, true); 193 StartGridService(testScene, true);
194 StartUserAccountService(testScene); 194 StartUserAccountService(testScene);
195 StartPresenceService(testScene); 195 StartPresenceService(testScene);
196 } 196 }
@@ -207,7 +207,7 @@ namespace OpenSim.Tests.Common.Setup
207 m_presenceService.RegionLoaded(testScene); 207 m_presenceService.RegionLoaded(testScene);
208 208
209 } 209 }
210 210
211 m_inventoryService.PostInitialise(); 211 m_inventoryService.PostInitialise();
212 m_assetService.PostInitialise(); 212 m_assetService.PostInitialise();
213 m_userAccountService.PostInitialise(); 213 m_userAccountService.PostInitialise();
@@ -250,7 +250,7 @@ namespace OpenSim.Tests.Common.Setup
250 else 250 else
251 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService"); 251 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService");
252 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 252 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
253 assetService.Initialise(config); 253 assetService.Initialise(config);
254 assetService.AddRegion(testScene); 254 assetService.AddRegion(testScene);
255 assetService.RegionLoaded(testScene); 255 assetService.RegionLoaded(testScene);
256 testScene.AddRegionModule(assetService.Name, assetService); 256 testScene.AddRegionModule(assetService.Name, assetService);
@@ -277,7 +277,7 @@ namespace OpenSim.Tests.Common.Setup
277 testScene.AddRegionModule(service.Name, service); 277 testScene.AddRegionModule(service.Name, service);
278 //m_authenticationService = service; 278 //m_authenticationService = service;
279 } 279 }
280 280
281 private static void StartInventoryService(Scene testScene, bool real) 281 private static void StartInventoryService(Scene testScene, bool real)
282 { 282 {
283 ISharedRegionModule inventoryService = new LocalInventoryServicesConnector(); 283 ISharedRegionModule inventoryService = new LocalInventoryServicesConnector();
@@ -285,7 +285,7 @@ namespace OpenSim.Tests.Common.Setup
285 config.AddConfig("Modules"); 285 config.AddConfig("Modules");
286 config.AddConfig("InventoryService"); 286 config.AddConfig("InventoryService");
287 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); 287 config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector");
288 288
289 if (real) 289 if (real)
290 { 290 {
291 config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService"); 291 config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService");
@@ -294,7 +294,7 @@ namespace OpenSim.Tests.Common.Setup
294 { 294 {
295 config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService"); 295 config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService");
296 } 296 }
297 297
298 config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); 298 config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
299 inventoryService.Initialise(config); 299 inventoryService.Initialise(config);
300 inventoryService.AddRegion(testScene); 300 inventoryService.AddRegion(testScene);
@@ -338,14 +338,14 @@ namespace OpenSim.Tests.Common.Setup
338 config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); 338 config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
339 config.Configs["UserAccountService"].Set( 339 config.Configs["UserAccountService"].Set(
340 "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService"); 340 "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService");
341 341
342 if (m_userAccountService == null) 342 if (m_userAccountService == null)
343 { 343 {
344 ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector(); 344 ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector();
345 userAccountService.Initialise(config); 345 userAccountService.Initialise(config);
346 m_userAccountService = userAccountService; 346 m_userAccountService = userAccountService;
347 } 347 }
348 348
349 m_userAccountService.AddRegion(testScene); 349 m_userAccountService.AddRegion(testScene);
350 m_userAccountService.RegionLoaded(testScene); 350 m_userAccountService.RegionLoaded(testScene);
351 testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService); 351 testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService);
@@ -559,5 +559,4 @@ namespace OpenSim.Tests.Common.Setup
559 sogd.InventoryDeQueueAndDelete(); 559 sogd.InventoryDeQueueAndDelete();
560 } 560 }
561 } 561 }
562
563} 562}