From 48720ea7a227a0eebecff365deb295fc08207c6c Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 21 Apr 2009 16:21:15 +0000 Subject: * extend user cache update test to check data backend --- .../Communications/Tests/Cache/UserProfileCacheServiceTests.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Framework/Communications/Tests') diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 68303b0..c7f3bfc 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs @@ -86,9 +86,11 @@ namespace OpenSim.Framework.Communications.Tests TestCommunicationsManager commsManager = new TestCommunicationsManager(); UserProfileCacheService userCacheService = commsManager.UserProfileCacheService; + IUserDataPlugin userDataPlugin = commsManager.UserDataPlugin; // Check that we can't update info before it exists Assert.That(userCacheService.UpdateProfile(newProfile), Is.False); + Assert.That(userDataPlugin.GetUserByUUID(userId), Is.Null); // Check that we can update a profile once it exists LocalUserServices lus = (LocalUserServices)commsManager.UserService; @@ -97,6 +99,7 @@ namespace OpenSim.Framework.Communications.Tests Assert.That(userCacheService.UpdateProfile(newProfile), Is.True); UserProfileData retrievedProfile = userCacheService.GetUserDetails(userId).UserProfile; Assert.That(retrievedProfile.SurName, Is.EqualTo(newLastName)); + Assert.That(userDataPlugin.GetUserByUUID(userId).SurName, Is.EqualTo(newLastName)); } [Test] -- cgit v1.1