* extend user cache update test to check data backend

0.6.5-rc1
Justin Clarke Casey 2009-04-21 16:21:15 +00:00
parent 4a8313f14c
commit 48720ea7a2
1 changed files with 3 additions and 0 deletions

View File

@ -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]