aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
diff options
context:
space:
mode:
authorDiva Canto2010-01-10 10:40:07 -0800
committerDiva Canto2010-01-10 10:40:07 -0800
commit1e1b2ab221851efc414678b7ea52ef2ca788ce9f (patch)
tree29b6aa80e54a9c18529ae14e7d185fe67582d151 /OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
parentAdd a "LockedOut" flag to allow locking a region out via the grid server. (diff)
downloadopensim-SC_OLD-1e1b2ab221851efc414678b7ea52ef2ca788ce9f.zip
opensim-SC_OLD-1e1b2ab221851efc414678b7ea52ef2ca788ce9f.tar.gz
opensim-SC_OLD-1e1b2ab221851efc414678b7ea52ef2ca788ce9f.tar.bz2
opensim-SC_OLD-1e1b2ab221851efc414678b7ea52ef2ca788ce9f.tar.xz
* OMG! All but one references to UserProfileCacheService have been rerouted!
* HG is seriously broken here * Compiles. Untested.
Diffstat (limited to 'OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs')
-rw-r--r--OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs147
1 files changed, 75 insertions, 72 deletions
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
index cb76bc1..b54299b 100644
--- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
+++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
@@ -37,82 +37,85 @@ namespace OpenSim.Tests.Common.Setup
37 /// </summary> 37 /// </summary>
38 public static class UserProfileTestUtils 38 public static class UserProfileTestUtils
39 { 39 {
40 /// <summary> 40 // REFACTORING PROBLEM
41 /// Create a test user with a standard inventory 41 // This needs to be rewritten
42 /// </summary> 42
43 /// <param name="commsManager"></param> 43 ///// <summary>
44 /// <param name="callback"> 44 ///// Create a test user with a standard inventory
45 /// Callback to invoke when inventory has been loaded. This is required because 45 ///// </summary>
46 /// loading may be asynchronous, even on standalone 46 ///// <param name="commsManager"></param>
47 /// </param> 47 ///// <param name="callback">
48 /// <returns></returns> 48 ///// Callback to invoke when inventory has been loaded. This is required because
49 public static CachedUserInfo CreateUserWithInventory( 49 ///// loading may be asynchronous, even on standalone
50 CommunicationsManager commsManager, OnInventoryReceivedDelegate callback) 50 ///// </param>
51 { 51 ///// <returns></returns>
52 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); 52 //public static CachedUserInfo CreateUserWithInventory(
53 return CreateUserWithInventory(commsManager, userId, callback); 53 // CommunicationsManager commsManager, OnInventoryReceivedDelegate callback)
54 } 54 //{
55 // UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099");
56 // return CreateUserWithInventory(commsManager, userId, callback);
57 //}
55 58
56 /// <summary> 59 ///// <summary>
57 /// Create a test user with a standard inventory 60 ///// Create a test user with a standard inventory
58 /// </summary> 61 ///// </summary>
59 /// <param name="commsManager"></param> 62 ///// <param name="commsManager"></param>
60 /// <param name="userId">User ID</param> 63 ///// <param name="userId">User ID</param>
61 /// <param name="callback"> 64 ///// <param name="callback">
62 /// Callback to invoke when inventory has been loaded. This is required because 65 ///// Callback to invoke when inventory has been loaded. This is required because
63 /// loading may be asynchronous, even on standalone 66 ///// loading may be asynchronous, even on standalone
64 /// </param> 67 ///// </param>
65 /// <returns></returns> 68 ///// <returns></returns>
66 public static CachedUserInfo CreateUserWithInventory( 69 //public static CachedUserInfo CreateUserWithInventory(
67 CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback) 70 // CommunicationsManager commsManager, UUID userId, OnInventoryReceivedDelegate callback)
68 { 71 //{
69 return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback); 72 // return CreateUserWithInventory(commsManager, "Bill", "Bailey", userId, callback);
70 } 73 //}
71 74
72 /// <summary> 75 ///// <summary>
73 /// Create a test user with a standard inventory 76 ///// Create a test user with a standard inventory
74 /// </summary> 77 ///// </summary>
75 /// <param name="commsManager"></param> 78 ///// <param name="commsManager"></param>
76 /// <param name="firstName">First name of user</param> 79 ///// <param name="firstName">First name of user</param>
77 /// <param name="lastName">Last name of user</param> 80 ///// <param name="lastName">Last name of user</param>
78 /// <param name="userId">User ID</param> 81 ///// <param name="userId">User ID</param>
79 /// <param name="callback"> 82 ///// <param name="callback">
80 /// Callback to invoke when inventory has been loaded. This is required because 83 ///// Callback to invoke when inventory has been loaded. This is required because
81 /// loading may be asynchronous, even on standalone 84 ///// loading may be asynchronous, even on standalone
82 /// </param> 85 ///// </param>
83 /// <returns></returns> 86 ///// <returns></returns>
84 public static CachedUserInfo CreateUserWithInventory( 87 //public static CachedUserInfo CreateUserWithInventory(
85 CommunicationsManager commsManager, string firstName, string lastName, 88 // CommunicationsManager commsManager, string firstName, string lastName,
86 UUID userId, OnInventoryReceivedDelegate callback) 89 // UUID userId, OnInventoryReceivedDelegate callback)
87 { 90 //{
88 return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback); 91 // return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
89 } 92 //}
90 93
91 /// <summary> 94 ///// <summary>
92 /// Create a test user with a standard inventory 95 ///// Create a test user with a standard inventory
93 /// </summary> 96 ///// </summary>
94 /// <param name="commsManager"></param> 97 ///// <param name="commsManager"></param>
95 /// <param name="firstName">First name of user</param> 98 ///// <param name="firstName">First name of user</param>
96 /// <param name="lastName">Last name of user</param> 99 ///// <param name="lastName">Last name of user</param>
97 /// <param name="password">Password</param> 100 ///// <param name="password">Password</param>
98 /// <param name="userId">User ID</param> 101 ///// <param name="userId">User ID</param>
99 /// <param name="callback"> 102 ///// <param name="callback">
100 /// Callback to invoke when inventory has been loaded. This is required because 103 ///// Callback to invoke when inventory has been loaded. This is required because
101 /// loading may be asynchronous, even on standalone 104 ///// loading may be asynchronous, even on standalone
102 /// </param> 105 ///// </param>
103 /// <returns></returns> 106 ///// <returns></returns>
104 public static CachedUserInfo CreateUserWithInventory( 107 //public static CachedUserInfo CreateUserWithInventory(
105 CommunicationsManager commsManager, string firstName, string lastName, string password, 108 // CommunicationsManager commsManager, string firstName, string lastName, string password,
106 UUID userId, OnInventoryReceivedDelegate callback) 109 // UUID userId, OnInventoryReceivedDelegate callback)
107 { 110 //{
108 LocalUserServices lus = (LocalUserServices)commsManager.UserService; 111 // LocalUserServices lus = (LocalUserServices)commsManager.UserService;
109 lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId); 112 // lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId);
110 113
111 CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); 114 // CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId);
112 userInfo.OnInventoryReceived += callback; 115 // userInfo.OnInventoryReceived += callback;
113 userInfo.FetchInventory(); 116 // userInfo.FetchInventory();
114 117
115 return userInfo; 118 // return userInfo;
116 } 119 //}
117 } 120 }
118} 121}