diff options
author | John Hurliman | 2009-11-05 23:50:42 -0800 |
---|---|---|
committer | John Hurliman | 2009-11-05 23:50:42 -0800 |
commit | dfe4dc735af35e644130cc804828c518c8368836 (patch) | |
tree | 95c8e02cf8be328bdb44b5177bca4bad725328a6 /OpenSim/Tests | |
parent | * Clamp the CoarseLocationUpdate packet at a maximum of 60 positions per pack... (diff) | |
parent | add unit test for iar & escaping (diff) | |
download | opensim-SC_OLD-dfe4dc735af35e644130cc804828c518c8368836.zip opensim-SC_OLD-dfe4dc735af35e644130cc804828c518c8368836.tar.gz opensim-SC_OLD-dfe4dc735af35e644130cc804828c518c8368836.tar.bz2 opensim-SC_OLD-dfe4dc735af35e644130cc804828c518c8368836.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r-- | OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 24 | ||||
-rw-r--r-- | OpenSim/Tests/Common/TestHelper.cs | 1 |
2 files changed, 23 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 | } |
diff --git a/OpenSim/Tests/Common/TestHelper.cs b/OpenSim/Tests/Common/TestHelper.cs index 4abf2e3..9d53063 100644 --- a/OpenSim/Tests/Common/TestHelper.cs +++ b/OpenSim/Tests/Common/TestHelper.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Tests.Common | |||
54 | public static void InMethod() | 54 | public static void InMethod() |
55 | { | 55 | { |
56 | StackTrace stackTrace = new StackTrace(); | 56 | StackTrace stackTrace = new StackTrace(); |
57 | Console.WriteLine(); | ||
57 | Console.WriteLine("===> In Test Method : {0} <===", stackTrace.GetFrame(1).GetMethod().Name); | 58 | Console.WriteLine("===> In Test Method : {0} <===", stackTrace.GetFrame(1).GetMethod().Name); |
58 | } | 59 | } |
59 | } | 60 | } |