fission UserAccountService.HandleCreateUser() into two methods, one which handles user command parsing and another which actually does the work

This commit is contained in:
Justin Clark-Casey (justincc)
2010-05-28 21:14:15 +01:00
parent 3c0f34bc2b
commit 505cb82dee
4 changed files with 143 additions and 138 deletions

View File

@@ -36,85 +36,82 @@ namespace OpenSim.Tests.Common.Setup
/// </summary>
public static class UserProfileTestUtils
{
// REFACTORING PROBLEM
// This needs to be rewritten
///// <summary>
///// Create a test user with a standard inventory
///// </summary>
///// <param name="commsManager"></param>
///// <param name="callback">
///// Callback to invoke when inventory has been loaded. This is required because
///// loading may be asynchronous, even on standalone
///// </param>
///// <returns></returns>
//public static CachedUserInfo CreateUserWithInventory(
// CommunicationsManager commsManager, OnInventoryReceivedDelegate callback)
//{
// UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099");
// return CreateUserWithInventory(commsManager, userId, callback);
//}
///// <summary>
///// Create a test user with a standard inventory
///// </summary>
///// <param name="commsManager"></param>
///// <param name="userId">User ID</param>
///// <param name="callback">
///// Callback to invoke when inventory has been loaded. This is required because
///// loading may be asynchronous, even on standalone
///// </param>
///// <returns></returns>
//public static CachedUserInfo CreateUserWithInventory(
// CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback)
//{
// return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback);
//}
///// <summary>
///// Create a test user with a standard inventory
///// </summary>
///// <param name="commsManager"></param>
///// <param name="firstName">First name of user</param>
///// <param name="lastName">Last name of user</param>
///// <param name="userId">User ID</param>
///// <param name="callback">
///// Callback to invoke when inventory has been loaded. This is required because
///// loading may be asynchronous, even on standalone
///// </param>
///// <returns></returns>
//public static CachedUserInfo CreateUserWithInventory(
// CommunicationsManager commsManager, string firstName, string lastName,
// UUID userId, OnInventoryReceivedDelegate callback)
//{
// return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
//}
///// <summary>
///// Create a test user with a standard inventory
///// </summary>
///// <param name="commsManager"></param>
///// <param name="firstName">First name of user</param>
///// <param name="lastName">Last name of user</param>
///// <param name="password">Password</param>
///// <param name="userId">User ID</param>
///// <param name="callback">
///// Callback to invoke when inventory has been loaded. This is required because
///// loading may be asynchronous, even on standalone
///// </param>
///// <returns></returns>
//public static CachedUserInfo CreateUserWithInventory(
// CommunicationsManager commsManager, string firstName, string lastName, string password,
// UUID userId, OnInventoryReceivedDelegate callback)
//{
// LocalUserServices lus = (LocalUserServices)commsManager.UserService;
// lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId);
// CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
// userInfo.OnInventoryReceived += callback;
// userInfo.FetchInventory();
// return userInfo;
//}
// /// <summary>
// /// Create a test user with a standard inventory
// /// </summary>
// /// <param name="commsManager"></param>
// /// <param name="callback">
// /// Callback to invoke when inventory has been loaded. This is required because
// /// loading may be asynchronous, even on standalone
// /// </param>
// /// <returns></returns>
// public static CachedUserInfo CreateUserWithInventory(
// CommunicationsManager commsManager, OnInventoryReceivedDelegate callback)
// {
// UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099");
// return CreateUserWithInventory(commsManager, userId, callback);
// }
//
// /// <summary>
// /// Create a test user with a standard inventory
// /// </summary>
// /// <param name="commsManager"></param>
// /// <param name="userId">User ID</param>
// /// <param name="callback">
// /// Callback to invoke when inventory has been loaded. This is required because
// /// loading may be asynchronous, even on standalone
// /// </param>
// /// <returns></returns>
// public static CachedUserInfo CreateUserWithInventory(
// CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback)
// {
// return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback);
// }
//
// /// <summary>
// /// Create a test user with a standard inventory
// /// </summary>
// /// <param name="commsManager"></param>
// /// <param name="firstName">First name of user</param>
// /// <param name="lastName">Last name of user</param>
// /// <param name="userId">User ID</param>
// /// <param name="callback">
// /// Callback to invoke when inventory has been loaded. This is required because
// /// loading may be asynchronous, even on standalone
// /// </param>
// /// <returns></returns>
// public static CachedUserInfo CreateUserWithInventory(
// CommunicationsManager commsManager, string firstName, string lastName,
// UUID userId, OnInventoryReceivedDelegate callback)
// {
// return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
// }
//
// /// <summary>
// /// Create a test user with a standard inventory
// /// </summary>
// /// <param name="commsManager"></param>
// /// <param name="firstName">First name of user</param>
// /// <param name="lastName">Last name of user</param>
// /// <param name="password">Password</param>
// /// <param name="userId">User ID</param>
// /// <param name="callback">
// /// Callback to invoke when inventory has been loaded. This is required because
// /// loading may be asynchronous, even on standalone
// /// </param>
// /// <returns></returns>
// public static CachedUserInfo CreateUserWithInventory(
// CommunicationsManager commsManager, string firstName, string lastName, string password,
// UUID userId, OnInventoryReceivedDelegate callback)
// {
// LocalUserServices lus = (LocalUserServices)commsManager.UserService;
// lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId);
//
// CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
// userInfo.OnInventoryReceived += callback;
// userInfo.FetchInventory();
//
// return userInfo;
// }
}
}
}