28 using System.Collections.Generic;
31 using OpenSim.Region.Framework.Scenes;
32 using OpenSim.Services.Interfaces;
34 namespace OpenSim.Tests.Common
39 public static class UserAccountHelpers
121 return CreateUserWithInventory(scene, TestHelpers.ParseTail(99));
126 return CreateUserWithInventory(scene,
"Bill",
"Bailey", userId,
"troll");
131 return CreateUserWithInventory(scene,
"Bill",
"Bailey", TestHelpers.ParseTail(userId),
"troll");
135 Scene scene,
string firstName,
string lastName, UUID userId,
string pw)
138 CreateUserWithInventory(scene, ua, pw);
143 Scene scene,
string firstName,
string lastName,
int userId,
string pw)
146 =
new UserAccount(TestHelpers.ParseTail(userId)) { FirstName = firstName, LastName = lastName };
147 CreateUserWithInventory(scene, ua, pw);
151 public static void CreateUserWithInventory(
Scene scene,
UserAccount ua,
string pw)
154 ua.ServiceURLs =
new Dictionary<string, object>();
155 scene.UserAccountService.StoreUserAccount(ua);
156 scene.InventoryService.CreateUserInventory(ua.PrincipalID);
157 scene.AuthenticationService.SetPassword(ua.PrincipalID, pw);