diff options
author | Justin Clark-Casey (justincc) | 2009-11-05 19:32:24 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-05 19:32:24 +0000 |
commit | f8f1e94cf88fe5894366b1b11ebc3c000078cb2a (patch) | |
tree | 06e3ecae0e88375710640bcdd3e3ee6486ec44e1 /OpenSim/Tests/Common/Setup | |
parent | minor test var name tweak (diff) | |
download | opensim-SC_OLD-f8f1e94cf88fe5894366b1b11ebc3c000078cb2a.zip opensim-SC_OLD-f8f1e94cf88fe5894366b1b11ebc3c000078cb2a.tar.gz opensim-SC_OLD-f8f1e94cf88fe5894366b1b11ebc3c000078cb2a.tar.bz2 opensim-SC_OLD-f8f1e94cf88fe5894366b1b11ebc3c000078cb2a.tar.xz |
add unit test for iar & escaping
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs index 3ca44a1..1b06a46 100644 --- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | |||
@@ -85,14 +85,34 @@ namespace OpenSim.Tests.Common.Setup | |||
85 | CommunicationsManager commsManager, string firstName, string lastName, | 85 | CommunicationsManager commsManager, string firstName, string lastName, |
86 | UUID userId, OnInventoryReceivedDelegate callback) | 86 | UUID userId, OnInventoryReceivedDelegate callback) |
87 | { | 87 | { |
88 | return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback); | ||
89 | } | ||
90 | |||
91 | /// <summary> | ||
92 | /// Create a test user with a standard inventory | ||
93 | /// </summary> | ||
94 | /// <param name="commsManager"></param> | ||
95 | /// <param name="firstName">First name of user</param> | ||
96 | /// <param name="lastName">Last name of user</param> | ||
97 | /// <param name="password">Password</param> | ||
98 | /// <param name="userId">User ID</param> | ||
99 | /// <param name="callback"> | ||
100 | /// Callback to invoke when inventory has been loaded. This is required because | ||
101 | /// loading may be asynchronous, even on standalone | ||
102 | /// </param> | ||
103 | /// <returns></returns> | ||
104 | public static CachedUserInfo CreateUserWithInventory( | ||
105 | CommunicationsManager commsManager, string firstName, string lastName, string password, | ||
106 | UUID userId, OnInventoryReceivedDelegate callback) | ||
107 | { | ||
88 | LocalUserServices lus = (LocalUserServices)commsManager.UserService; | 108 | LocalUserServices lus = (LocalUserServices)commsManager.UserService; |
89 | lus.AddUser(firstName, lastName, "troll", "bill@bailey.com", 1000, 1000, userId); | 109 | lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId); |
90 | 110 | ||
91 | CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); | 111 | CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); |
92 | userInfo.OnInventoryReceived += callback; | 112 | userInfo.OnInventoryReceived += callback; |
93 | userInfo.FetchInventory(); | 113 | userInfo.FetchInventory(); |
94 | 114 | ||
95 | return userInfo; | 115 | return userInfo; |
96 | } | 116 | } |
97 | } | 117 | } |
98 | } | 118 | } |