add unit test for iar & escaping

This commit is contained in:
Justin Clark-Casey (justincc)
2009-11-05 19:32:24 +00:00
parent 6f4a588397
commit f8f1e94cf8
3 changed files with 117 additions and 4 deletions

View File

@@ -84,15 +84,35 @@ namespace OpenSim.Tests.Common.Setup
public static CachedUserInfo CreateUserWithInventory(
CommunicationsManager commsManager, string firstName, string lastName,
UUID userId, OnInventoryReceivedDelegate callback)
{
return CreateUserWithInventory(commsManager, firstName, lastName, "troll", userId, callback);
}
/// <summary>
/// Create a test user with a standard inventory
/// </summary>
/// <param name="commsManager"></param>
/// <param name="firstName">First name of user</param>
/// <param name="lastName">Last name of user</param>
/// <param name="password">Password</param>
/// <param name="userId">User ID</param>
/// <param name="callback">
/// Callback to invoke when inventory has been loaded. This is required because
/// loading may be asynchronous, even on standalone
/// </param>
/// <returns></returns>
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;
}
}
}
}