* extend user cache update test to check data backend
parent
4a8313f14c
commit
48720ea7a2
|
@ -86,9 +86,11 @@ namespace OpenSim.Framework.Communications.Tests
|
||||||
|
|
||||||
TestCommunicationsManager commsManager = new TestCommunicationsManager();
|
TestCommunicationsManager commsManager = new TestCommunicationsManager();
|
||||||
UserProfileCacheService userCacheService = commsManager.UserProfileCacheService;
|
UserProfileCacheService userCacheService = commsManager.UserProfileCacheService;
|
||||||
|
IUserDataPlugin userDataPlugin = commsManager.UserDataPlugin;
|
||||||
|
|
||||||
// Check that we can't update info before it exists
|
// Check that we can't update info before it exists
|
||||||
Assert.That(userCacheService.UpdateProfile(newProfile), Is.False);
|
Assert.That(userCacheService.UpdateProfile(newProfile), Is.False);
|
||||||
|
Assert.That(userDataPlugin.GetUserByUUID(userId), Is.Null);
|
||||||
|
|
||||||
// Check that we can update a profile once it exists
|
// Check that we can update a profile once it exists
|
||||||
LocalUserServices lus = (LocalUserServices)commsManager.UserService;
|
LocalUserServices lus = (LocalUserServices)commsManager.UserService;
|
||||||
|
@ -97,6 +99,7 @@ namespace OpenSim.Framework.Communications.Tests
|
||||||
Assert.That(userCacheService.UpdateProfile(newProfile), Is.True);
|
Assert.That(userCacheService.UpdateProfile(newProfile), Is.True);
|
||||||
UserProfileData retrievedProfile = userCacheService.GetUserDetails(userId).UserProfile;
|
UserProfileData retrievedProfile = userCacheService.GetUserDetails(userId).UserProfile;
|
||||||
Assert.That(retrievedProfile.SurName, Is.EqualTo(newLastName));
|
Assert.That(retrievedProfile.SurName, Is.EqualTo(newLastName));
|
||||||
|
Assert.That(userDataPlugin.GetUserByUUID(userId).SurName, Is.EqualTo(newLastName));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
Loading…
Reference in New Issue