aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/BasicUserTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/Tests/BasicUserTest.cs')
-rw-r--r--OpenSim/Data/Tests/BasicUserTest.cs39
1 files changed, 24 insertions, 15 deletions
diff --git a/OpenSim/Data/Tests/BasicUserTest.cs b/OpenSim/Data/Tests/BasicUserTest.cs
index 4e4ddc8..f9feb9b 100644
--- a/OpenSim/Data/Tests/BasicUserTest.cs
+++ b/OpenSim/Data/Tests/BasicUserTest.cs
@@ -71,14 +71,7 @@ namespace OpenSim.Data.Tests
71 71
72 public void SuperInit() 72 public void SuperInit()
73 { 73 {
74 try 74 OpenSim.Tests.Common.TestLogging.LogToConsole();
75 {
76 XmlConfigurator.Configure();
77 }
78 catch (Exception)
79 {
80 // I don't care, just leave log4net off
81 }
82 random = new Random(); 75 random = new Random();
83 user1 = UUID.Random(); 76 user1 = UUID.Random();
84 user2 = UUID.Random(); 77 user2 = UUID.Random();
@@ -118,13 +111,6 @@ namespace OpenSim.Data.Tests
118 } 111 }
119 112
120 [Test] 113 [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() 114 public void T010_CreateUser()
129 { 115 {
130 UserProfileData u1 = NewUser(user1,fname1,lname1); 116 UserProfileData u1 = NewUser(user1,fname1,lname1);
@@ -396,6 +382,22 @@ namespace OpenSim.Data.Tests
396 Assert.That(customtype,Is.EqualTo(u1a.CustomType), "Assert.That(customtype,Is.EqualTo(u1a.CustomType))"); 382 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))"); 383 Assert.That(partner,Is.EqualTo(u1a.Partner), "Assert.That(partner,Is.EqualTo(u1a.Partner))");
398 } 384 }
385
386 [Test]
387 public void T017_UserUpdateRandomPersistency()
388 {
389 UUID id = user5;
390 UserProfileData u = db.GetUserByUUID(id);
391 new PropertyScrambler<UserProfileData>().DontScramble(x=>x.ID).Scramble(u);
392
393 db.UpdateUserProfile(u);
394 UserProfileData u1a = db.GetUserByUUID(id);
395 Assert.That(u1a, Constraints.PropertyCompareConstraint(u)
396 .IgnoreProperty(x=>x.HomeRegionX)
397 .IgnoreProperty(x=>x.HomeRegionY)
398 .IgnoreProperty(x=>x.RootInventoryFolderID)
399 );
400 }
399 401
400 [Test] 402 [Test]
401 public void T020_CreateAgent() 403 public void T020_CreateAgent()
@@ -660,6 +662,13 @@ namespace OpenSim.Data.Tests
660 Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight), "Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight))"); 662 Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight), "Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight))");
661 } 663 }
662 664
665 [Test]
666 public void T999_StillNull()
667 {
668 Assert.That(db.GetUserByUUID(zero), Is.Null);
669 Assert.That(db.GetAgentByUUID(zero), Is.Null);
670 }
671
663 public UserProfileData NewUser(UUID id,string fname,string lname) 672 public UserProfileData NewUser(UUID id,string fname,string lname)
664 { 673 {
665 UserProfileData u = new UserProfileData(); 674 UserProfileData u = new UserProfileData();