From 230eb06d34a36a61b7ca14bb0abb6274f3bc3b03 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 11 Dec 2008 17:30:57 +0000 Subject: [PATCH] * Extend test to probe for user details that should exist --- .../Tests/Cache/UserProfileCacheServiceTests.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 03f4586c41..62a42a9af4 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs @@ -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"); } } }