aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Tests
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-12-11 17:23:55 +0000
committerJustin Clarke Casey2008-12-11 17:23:55 +0000
commitc4b45449ee571d919836caaf57ab63ff10110335 (patch)
tree212e018b0705e60b13bcd343cba7f88fa6e28efa /OpenSim/Framework/Communications/Tests
parent* minor: Move mock test classes into mock namespace (diff)
downloadopensim-SC_OLD-c4b45449ee571d919836caaf57ab63ff10110335.zip
opensim-SC_OLD-c4b45449ee571d919836caaf57ab63ff10110335.tar.gz
opensim-SC_OLD-c4b45449ee571d919836caaf57ab63ff10110335.tar.bz2
opensim-SC_OLD-c4b45449ee571d919836caaf57ab63ff10110335.tar.xz
* test: Add simple user profile test that checks for non-existing users
Diffstat (limited to 'OpenSim/Framework/Communications/Tests')
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs18
1 files changed, 15 insertions, 3 deletions
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 @@
27 27
28using System; 28using System;
29using NUnit.Framework; 29using NUnit.Framework;
30using NUnit.Framework.SyntaxHelpers;
31using OpenMetaverse;
32using OpenSim.Framework.Communications.Cache;
33using OpenSim.Region.Communications.Local;
34using OpenSim.Tests.Infra.Mock;
30 35
31namespace OpenSim.Framework.Communications.Tests 36namespace OpenSim.Framework.Communications.Tests
32{ 37{
@@ -37,12 +42,19 @@ namespace OpenSim.Framework.Communications.Tests
37 public class UserProfileCacheServiceTests 42 public class UserProfileCacheServiceTests
38 { 43 {
39 /// <summary> 44 /// <summary>
40 /// Test folder moving. Doesn't do what is says on the tin yet 45 /// Test user details get.
41 /// </summary> 46 /// </summary>
42 [Test] 47 [Test]
43 public void TestMoveFolder() 48 public void TestGetUserDetails()
44 { 49 {
45 // Temporarily empty 50 UUID nonExistingUserId = UUID.Parse("00000000-0000-0000-0000-000000000001");
51
52 CommunicationsManager commsManager = new TestCommunicationsManager();
53 ((LocalUserServices)commsManager.UserService).AddPlugin(new TestUserDataPlugin());
54 ((LocalInventoryService)commsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin());
55
56 CachedUserInfo nonExistingUserInfo = commsManager.UserProfileCacheService.GetUserDetails(nonExistingUserId);
57 Assert.That(nonExistingUserInfo, Is.Null, "Non existing user info unexpectedly exists!");
46 } 58 }
47 } 59 }
48} 60}