From c4b45449ee571d919836caaf57ab63ff10110335 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 11 Dec 2008 17:23:55 +0000 Subject: * test: Add simple user profile test that checks for non-existing users --- .../Tests/Cache/UserProfileCacheServiceTests.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Communications/Tests/Cache') diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 0d239aa..03f4586 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs @@ -27,6 +27,11 @@ using System; using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; +using OpenMetaverse; +using OpenSim.Framework.Communications.Cache; +using OpenSim.Region.Communications.Local; +using OpenSim.Tests.Infra.Mock; namespace OpenSim.Framework.Communications.Tests { @@ -37,12 +42,19 @@ namespace OpenSim.Framework.Communications.Tests public class UserProfileCacheServiceTests { /// - /// Test folder moving. Doesn't do what is says on the tin yet + /// Test user details get. /// [Test] - public void TestMoveFolder() + public void TestGetUserDetails() { - // Temporarily empty + UUID nonExistingUserId = UUID.Parse("00000000-0000-0000-0000-000000000001"); + + CommunicationsManager commsManager = new TestCommunicationsManager(); + ((LocalUserServices)commsManager.UserService).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!"); } } } -- cgit v1.1