* Extend test to probe for user details that should exist

0.6.1-post-fixes
Justin Clarke Casey 2008-12-11 17:30:57 +00:00
parent c4b45449ee
commit 230eb06d34
1 changed files with 8 additions and 2 deletions

View File

@ -48,13 +48,19 @@ namespace OpenSim.Framework.Communications.Tests
public void TestGetUserDetails()
{
UUID nonExistingUserId = UUID.Parse("00000000-0000-0000-0000-000000000001");
UUID existingUserId = UUID.Parse("00000000-0000-0000-0000-000000000002");
CommunicationsManager commsManager = new TestCommunicationsManager();
((LocalUserServices)commsManager.UserService).AddPlugin(new TestUserDataPlugin());
LocalUserServices lus = (LocalUserServices)commsManager.UserService;
lus.AddPlugin(new TestUserDataPlugin());
((LocalInventoryService)commsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin());
CachedUserInfo nonExistingUserInfo = commsManager.UserProfileCacheService.GetUserDetails(nonExistingUserId);
Assert.That(nonExistingUserInfo, Is.Null, "Non existing user info unexpectedly exists!");
Assert.That(nonExistingUserInfo, Is.Null, "Non existing user info unexpectedly found");
lus.AddUser("Bill", "Bailey", "troll", "bill@bailey.com", 1000, 1000, existingUserId);
CachedUserInfo existingUserInfo = commsManager.UserProfileCacheService.GetUserDetails(existingUserId);
Assert.That(existingUserInfo, Is.Not.Null, "Existing user info unexpectedly not found");
}
}
}