From 505cb82dee27fc1b681fd7c4b6f904ef18315995 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 28 May 2010 21:14:15 +0100 Subject: fission UserAccountService.HandleCreateUser() into two methods, one which handles user command parsing and another which actually does the work --- OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 159 ++++++++++----------- 1 file changed, 78 insertions(+), 81 deletions(-) (limited to 'OpenSim/Tests') diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs index cd61fa6..2b14d97 100644 --- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs @@ -36,85 +36,82 @@ namespace OpenSim.Tests.Common.Setup /// public static class UserProfileTestUtils { - // REFACTORING PROBLEM - // This needs to be rewritten - - ///// - ///// Create a test user with a standard inventory - ///// - ///// - ///// - ///// Callback to invoke when inventory has been loaded. This is required because - ///// loading may be asynchronous, even on standalone - ///// - ///// - //public static CachedUserInfo CreateUserWithInventory( - // CommunicationsManager commsManager, OnInventoryReceivedDelegate callback) - //{ - // UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); - // return CreateUserWithInventory(commsManager, userId, callback); - //} - - ///// - ///// Create a test user with a standard inventory - ///// - ///// - ///// User ID - ///// - ///// Callback to invoke when inventory has been loaded. This is required because - ///// loading may be asynchronous, even on standalone - ///// - ///// - //public static CachedUserInfo CreateUserWithInventory( - // CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback) - //{ - // return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback); - //} - - ///// - ///// Create a test user with a standard inventory - ///// - ///// - ///// First name of user - ///// Last name of user - ///// User ID - ///// - ///// Callback to invoke when inventory has been loaded. This is required because - ///// loading may be asynchronous, even on standalone - ///// - ///// - //public static CachedUserInfo CreateUserWithInventory( - // CommunicationsManager commsManager, string firstName, string lastName, - // UUID userId, OnInventoryReceivedDelegate callback) - //{ - // return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback); - //} - - ///// - ///// Create a test user with a standard inventory - ///// - ///// - ///// First name of user - ///// Last name of user - ///// Password - ///// User ID - ///// - ///// Callback to invoke when inventory has been loaded. This is required because - ///// loading may be asynchronous, even on standalone - ///// - ///// - //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; - //} +// /// +// /// Create a test user with a standard inventory +// /// +// /// +// /// +// /// Callback to invoke when inventory has been loaded. This is required because +// /// loading may be asynchronous, even on standalone +// /// +// /// +// public static CachedUserInfo CreateUserWithInventory( +// CommunicationsManager commsManager, OnInventoryReceivedDelegate callback) +// { +// UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); +// return CreateUserWithInventory(commsManager, userId, callback); +// } +// +// /// +// /// Create a test user with a standard inventory +// /// +// /// +// /// User ID +// /// +// /// Callback to invoke when inventory has been loaded. This is required because +// /// loading may be asynchronous, even on standalone +// /// +// /// +// public static CachedUserInfo CreateUserWithInventory( +// CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback) +// { +// return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback); +// } +// +// /// +// /// Create a test user with a standard inventory +// /// +// /// +// /// First name of user +// /// Last name of user +// /// User ID +// /// +// /// Callback to invoke when inventory has been loaded. This is required because +// /// loading may be asynchronous, even on standalone +// /// +// /// +// public static CachedUserInfo CreateUserWithInventory( +// CommunicationsManager commsManager, string firstName, string lastName, +// UUID userId, OnInventoryReceivedDelegate callback) +// { +// return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback); +// } +// +// /// +// /// Create a test user with a standard inventory +// /// +// /// +// /// First name of user +// /// Last name of user +// /// Password +// /// User ID +// /// +// /// Callback to invoke when inventory has been loaded. This is required because +// /// loading may be asynchronous, even on standalone +// /// +// /// +// 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; +// } } -} +} \ No newline at end of file -- cgit v1.1