From f8f1e94cf88fe5894366b1b11ebc3c000078cb2a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 5 Nov 2009 19:32:24 +0000 Subject: add unit test for iar & escaping --- OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs') 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 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, "troll", "bill@bailey.com", 1000, 1000, userId); + lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId); CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); userInfo.OnInventoryReceived += callback; userInfo.FetchInventory(); return userInfo; - } + } } } -- cgit v1.1