From 8f875700ef3f0d8e4d86192d2985aff250fe2d51 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Aug 2010 22:52:26 +0100 Subject: refactor: Make IAR tests set up standard iar for loading --- OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'OpenSim/Tests') 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 { UserAccount ua = new UserAccount(userId) - { FirstName = firstName, LastName = lastName, ServiceURLs = new Dictionary() }; + { FirstName = firstName, LastName = lastName }; + CreateUserWithInventory(scene, ua, pw); + return ua; + } + + public static void CreateUserWithInventory(Scene scene, UserAccount ua, string pw) + { + // FIXME: This should really be set up by UserAccount itself + ua.ServiceURLs = new Dictionary(); + scene.UserAccountService.StoreUserAccount(ua); scene.InventoryService.CreateUserInventory(ua.PrincipalID); scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); - - return ua; - } + } } } \ No newline at end of file -- cgit v1.1