aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs')
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs43
1 files changed, 5 insertions, 38 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
index b819581..99517d2 100644
--- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs
@@ -66,32 +66,7 @@ namespace OpenSim.Tests.Common.Setup
66 /// <returns></returns> 66 /// <returns></returns>
67 public static TestScene SetupScene() 67 public static TestScene SetupScene()
68 { 68 {
69 return SetupScene(""); 69 return SetupScene("Unit test region", UUID.Random(), 1000, 1000);
70 }
71
72 /// <summary>
73 /// Set up a test scene
74 /// </summary>
75 ///
76 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
77 /// <returns></returns>
78 public static TestScene SetupScene(String realServices)
79 {
80 return SetupScene("Unit test region", UUID.Random(), 1000, 1000, realServices);
81 }
82
83 /// <summary>
84 /// Set up a test scene
85 /// </summary>
86 /// <param name="name">Name of the region</param>
87 /// <param name="id">ID of the region</param>
88 /// <param name="x">X co-ordinate of the region</param>
89 /// <param name="y">Y co-ordinate of the region</param>
90 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
91 /// <returns></returns>
92 public static TestScene SetupScene(string name, UUID id, uint x, uint y)
93 {
94 return SetupScene(name, id, x, y, "");
95 } 70 }
96 71
97 /// <summary> 72 /// <summary>
@@ -103,10 +78,8 @@ namespace OpenSim.Tests.Common.Setup
103 /// <param name="x">X co-ordinate of the region</param> 78 /// <param name="x">X co-ordinate of the region</param>
104 /// <param name="y">Y co-ordinate of the region</param> 79 /// <param name="y">Y co-ordinate of the region</param>
105 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param> 80 /// <param name="cm">This should be the same if simulating two scenes within a standalone</param>
106 /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param>
107 /// <returns></returns> 81 /// <returns></returns>
108 public static TestScene SetupScene( 82 public static TestScene SetupScene(string name, UUID id, uint x, uint y)
109 string name, UUID id, uint x, uint y, String realServices)
110 { 83 {
111 Console.WriteLine("Setting up test scene {0}", name); 84 Console.WriteLine("Setting up test scene {0}", name);
112 85
@@ -130,12 +103,11 @@ namespace OpenSim.Tests.Common.Setup
130 IRegionModule godsModule = new GodsModule(); 103 IRegionModule godsModule = new GodsModule();
131 godsModule.Initialise(testScene, new IniConfigSource()); 104 godsModule.Initialise(testScene, new IniConfigSource());
132 testScene.AddModule(godsModule.Name, godsModule); 105 testScene.AddModule(godsModule.Name, godsModule);
133 realServices = realServices.ToLower();
134 106
135 LocalAssetServicesConnector assetService = StartAssetService(testScene); 107 LocalAssetServicesConnector assetService = StartAssetService(testScene);
136 StartAuthenticationService(testScene); 108 StartAuthenticationService(testScene);
137 LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene); 109 LocalInventoryServicesConnector inventoryService = StartInventoryService(testScene);
138 StartGridService(testScene, true); 110 StartGridService(testScene);
139 LocalUserAccountServicesConnector userAccountService = StartUserAccountService(testScene); 111 LocalUserAccountServicesConnector userAccountService = StartUserAccountService(testScene);
140 LocalPresenceServicesConnector presenceService = StartPresenceService(testScene); 112 LocalPresenceServicesConnector presenceService = StartPresenceService(testScene);
141 113
@@ -218,24 +190,19 @@ namespace OpenSim.Tests.Common.Setup
218 return inventoryService; 190 return inventoryService;
219 } 191 }
220 192
221 private static LocalGridServicesConnector StartGridService(Scene testScene, bool real) 193 private static LocalGridServicesConnector StartGridService(Scene testScene)
222 { 194 {
223 IConfigSource config = new IniConfigSource(); 195 IConfigSource config = new IniConfigSource();
224 config.AddConfig("Modules"); 196 config.AddConfig("Modules");
225 config.AddConfig("GridService"); 197 config.AddConfig("GridService");
226 config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); 198 config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector");
227 config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData"); 199 config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll:NullRegionData");
228 if (real) 200 config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
229 config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
230 201
231 LocalGridServicesConnector gridService = new LocalGridServicesConnector(); 202 LocalGridServicesConnector gridService = new LocalGridServicesConnector();
232 gridService.Initialise(config); 203 gridService.Initialise(config);
233
234 //else
235 // config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:TestGridService");
236 gridService.AddRegion(testScene); 204 gridService.AddRegion(testScene);
237 gridService.RegionLoaded(testScene); 205 gridService.RegionLoaded(testScene);
238 //testScene.AddRegionModule(m_gridService.Name, m_gridService);
239 206
240 return gridService; 207 return gridService;
241 } 208 }