diff options
author | Kunnis | 2009-08-09 02:01:21 -0500 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-16 13:35:44 -0400 |
commit | 23d478f2fa06d1dedabfb24cf6ff763b586173ce (patch) | |
tree | 072fdcfe343d84cf01b0881045fc96fb8403c324 /OpenSim/Data/Tests/BasicUserTest.cs | |
parent | Add copyright header. Formatting cleanup. (diff) | |
download | opensim-SC_OLD-23d478f2fa06d1dedabfb24cf6ff763b586173ce.zip opensim-SC_OLD-23d478f2fa06d1dedabfb24cf6ff763b586173ce.tar.gz opensim-SC_OLD-23d478f2fa06d1dedabfb24cf6ff763b586173ce.tar.bz2 opensim-SC_OLD-23d478f2fa06d1dedabfb24cf6ff763b586173ce.tar.xz |
Adding in Reflection-based testing, to ensure that all properties are covered.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/Tests/BasicUserTest.cs | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/OpenSim/Data/Tests/BasicUserTest.cs b/OpenSim/Data/Tests/BasicUserTest.cs index 4e4ddc8..21d1a7e 100644 --- a/OpenSim/Data/Tests/BasicUserTest.cs +++ b/OpenSim/Data/Tests/BasicUserTest.cs | |||
@@ -118,13 +118,6 @@ namespace OpenSim.Data.Tests | |||
118 | } | 118 | } |
119 | 119 | ||
120 | [Test] | 120 | [Test] |
121 | public void T999_StillNull() | ||
122 | { | ||
123 | Assert.That(db.GetUserByUUID(zero), Is.Null); | ||
124 | Assert.That(db.GetAgentByUUID(zero), Is.Null); | ||
125 | } | ||
126 | |||
127 | [Test] | ||
128 | public void T010_CreateUser() | 121 | public void T010_CreateUser() |
129 | { | 122 | { |
130 | UserProfileData u1 = NewUser(user1,fname1,lname1); | 123 | UserProfileData u1 = NewUser(user1,fname1,lname1); |
@@ -396,6 +389,22 @@ namespace OpenSim.Data.Tests | |||
396 | Assert.That(customtype,Is.EqualTo(u1a.CustomType), "Assert.That(customtype,Is.EqualTo(u1a.CustomType))"); | 389 | Assert.That(customtype,Is.EqualTo(u1a.CustomType), "Assert.That(customtype,Is.EqualTo(u1a.CustomType))"); |
397 | Assert.That(partner,Is.EqualTo(u1a.Partner), "Assert.That(partner,Is.EqualTo(u1a.Partner))"); | 390 | Assert.That(partner,Is.EqualTo(u1a.Partner), "Assert.That(partner,Is.EqualTo(u1a.Partner))"); |
398 | } | 391 | } |
392 | |||
393 | [Test] | ||
394 | public void T017_UserUpdateRandomPersistency() | ||
395 | { | ||
396 | UUID id = user5; | ||
397 | UserProfileData u = db.GetUserByUUID(id); | ||
398 | ScrambleForTesting.Scramble(u); | ||
399 | u.ID = id; | ||
400 | |||
401 | db.UpdateUserProfile(u); | ||
402 | UserProfileData u1a = db.GetUserByUUID(id); | ||
403 | Assert.That(u1a, Constraints.PropertyCompareConstraint(u) | ||
404 | .IgnoreProperty(x=>x.HomeRegionX) | ||
405 | .IgnoreProperty(x=>x.HomeRegionY) | ||
406 | ); | ||
407 | } | ||
399 | 408 | ||
400 | [Test] | 409 | [Test] |
401 | public void T020_CreateAgent() | 410 | public void T020_CreateAgent() |
@@ -660,6 +669,13 @@ namespace OpenSim.Data.Tests | |||
660 | Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight), "Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight))"); | 669 | Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight), "Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight))"); |
661 | } | 670 | } |
662 | 671 | ||
672 | [Test] | ||
673 | public void T999_StillNull() | ||
674 | { | ||
675 | Assert.That(db.GetUserByUUID(zero), Is.Null); | ||
676 | Assert.That(db.GetAgentByUUID(zero), Is.Null); | ||
677 | } | ||
678 | |||
663 | public UserProfileData NewUser(UUID id,string fname,string lname) | 679 | public UserProfileData NewUser(UUID id,string fname,string lname) |
664 | { | 680 | { |
665 | UserProfileData u = new UserProfileData(); | 681 | UserProfileData u = new UserProfileData(); |