diff options
author | KittoFlora | 2009-11-16 01:40:15 +0100 |
---|---|---|
committer | KittoFlora | 2009-11-16 01:40:15 +0100 |
commit | 873c9098d8627972e80a1688e85a4cda45e1e7fe (patch) | |
tree | a0edc24aef11d5ad6928493d8985386f48dd2607 /OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | |
parent | Merge branch 'vehicles' into tests (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-873c9098d8627972e80a1688e85a4cda45e1e7fe.zip opensim-SC_OLD-873c9098d8627972e80a1688e85a4cda45e1e7fe.tar.gz opensim-SC_OLD-873c9098d8627972e80a1688e85a4cda45e1e7fe.tar.bz2 opensim-SC_OLD-873c9098d8627972e80a1688e85a4cda45e1e7fe.tar.xz |
Merge branch 'careminster' into tests
Diffstat (limited to 'OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs')
-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 | } |