diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 6 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 15 |
2 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index eaa0d33..d9ded2d 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |||
@@ -285,10 +285,16 @@ 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 | if (real) | 289 | if (real) |
290 | { | ||
289 | config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService"); | 291 | config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService"); |
292 | } | ||
290 | else | 293 | else |
294 | { | ||
291 | config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService"); | 295 | config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService"); |
296 | } | ||
297 | |||
292 | config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); | 298 | config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); |
293 | inventoryService.Initialise(config); | 299 | inventoryService.Initialise(config); |
294 | inventoryService.AddRegion(testScene); | 300 | inventoryService.AddRegion(testScene); |
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs index 380f258..26156f3 100644 --- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | |||
@@ -127,12 +127,19 @@ namespace OpenSim.Tests.Common.Setup | |||
127 | { | 127 | { |
128 | UserAccount ua | 128 | UserAccount ua |
129 | = new UserAccount(userId) | 129 | = new UserAccount(userId) |
130 | { FirstName = firstName, LastName = lastName, ServiceURLs = new Dictionary<string, object>() }; | 130 | { FirstName = firstName, LastName = lastName }; |
131 | CreateUserWithInventory(scene, ua, pw); | ||
132 | return ua; | ||
133 | } | ||
134 | |||
135 | public static void CreateUserWithInventory(Scene scene, UserAccount ua, string pw) | ||
136 | { | ||
137 | // FIXME: This should really be set up by UserAccount itself | ||
138 | ua.ServiceURLs = new Dictionary<string, object>(); | ||
139 | |||
131 | scene.UserAccountService.StoreUserAccount(ua); | 140 | scene.UserAccountService.StoreUserAccount(ua); |
132 | scene.InventoryService.CreateUserInventory(ua.PrincipalID); | 141 | scene.InventoryService.CreateUserInventory(ua.PrincipalID); |
133 | scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); | 142 | scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); |
134 | 143 | } | |
135 | return ua; | ||
136 | } | ||
137 | } | 144 | } |
138 | } \ No newline at end of file | 145 | } \ No newline at end of file |