aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/BasicUserTest.cs
diff options
context:
space:
mode:
authordr scofield (aka dirk husemann)2009-10-01 09:48:02 +0200
committerdr scofield (aka dirk husemann)2009-10-01 09:48:02 +0200
commit9dcf7da42abfaf20a6a2ec552868dd37cc3e7261 (patch)
treea9c5145dea2ade7981922dffeed134c8e1a493ef /OpenSim/Data/Tests/BasicUserTest.cs
parentadding skeleton test case for LandDataSerializer [w-i-p] (diff)
parentRemoved an innefficent List.Contains lookup from UpdateQueue (diff)
downloadopensim-SC_OLD-9dcf7da42abfaf20a6a2ec552868dd37cc3e7261.zip
opensim-SC_OLD-9dcf7da42abfaf20a6a2ec552868dd37cc3e7261.tar.gz
opensim-SC_OLD-9dcf7da42abfaf20a6a2ec552868dd37cc3e7261.tar.bz2
opensim-SC_OLD-9dcf7da42abfaf20a6a2ec552868dd37cc3e7261.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into x-opensim
Diffstat (limited to 'OpenSim/Data/Tests/BasicUserTest.cs')
-rw-r--r--OpenSim/Data/Tests/BasicUserTest.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Data/Tests/BasicUserTest.cs b/OpenSim/Data/Tests/BasicUserTest.cs
index f9feb9b..1f472a5 100644
--- a/OpenSim/Data/Tests/BasicUserTest.cs
+++ b/OpenSim/Data/Tests/BasicUserTest.cs
@@ -152,7 +152,7 @@ namespace OpenSim.Data.Tests
152 u1.FirstName = "Ugly"; 152 u1.FirstName = "Ugly";
153 153
154 db.UpdateUserProfile(u1); 154 db.UpdateUserProfile(u1);
155 Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))"); 155 Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))");
156 } 156 }
157 157
158 [Test] 158 [Test]
@@ -174,7 +174,7 @@ namespace OpenSim.Data.Tests
174 db.AddNewUserProfile(u4); 174 db.AddNewUserProfile(u4);
175 Assert.That(db.GetUserByUUID(zero),Is.Null); 175 Assert.That(db.GetUserByUUID(zero),Is.Null);
176 Assert.That(db.GetUserByUUID(user4),Is.Null); 176 Assert.That(db.GetUserByUUID(user4),Is.Null);
177 } 177 }
178 178
179 [Test] 179 [Test]
180 public void T015_UserPersistency() 180 public void T015_UserPersistency()
@@ -218,7 +218,7 @@ namespace OpenSim.Data.Tests
218 218
219 //HomeRegionX and HomeRegionY must only use 24 bits 219 //HomeRegionX and HomeRegionY must only use 24 bits
220 homeregx = ((homeregx << 8) >> 8); 220 homeregx = ((homeregx << 8) >> 8);
221 homeregy = ((homeregy << 8) >> 8); 221 homeregy = ((homeregy << 8) >> 8);
222 222
223 u.ID = id; 223 u.ID = id;
224 u.WebLoginKey = webloginkey; 224 u.WebLoginKey = webloginkey;
@@ -299,7 +299,7 @@ namespace OpenSim.Data.Tests
299 uint homeregx = (uint) random.Next(); 299 uint homeregx = (uint) random.Next();
300 uint homeregy = (uint) random.Next(); 300 uint homeregy = (uint) random.Next();
301 Vector3 homeloc = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5)); 301 Vector3 homeloc = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
302 Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5)); 302 Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
303 int created = random.Next(); 303 int created = random.Next();
304 int lastlogin = random.Next(); 304 int lastlogin = random.Next();
305 string userinvuri = RandomName(); 305 string userinvuri = RandomName();
@@ -359,7 +359,7 @@ namespace OpenSim.Data.Tests
359 Assert.That(email,Is.EqualTo(u1a.Email), "Assert.That(email,Is.EqualTo(u1a.Email))"); 359 Assert.That(email,Is.EqualTo(u1a.Email), "Assert.That(email,Is.EqualTo(u1a.Email))");
360 Assert.That(passhash,Is.EqualTo(u1a.PasswordHash), "Assert.That(passhash,Is.EqualTo(u1a.PasswordHash))"); 360 Assert.That(passhash,Is.EqualTo(u1a.PasswordHash), "Assert.That(passhash,Is.EqualTo(u1a.PasswordHash))");
361 Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt), "Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt))"); 361 Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt), "Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt))");
362 Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))"); 362 Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
363 Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX), "Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX))"); 363 Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX), "Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX))");
364 Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY), "Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY))"); 364 Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY), "Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY))");
365 Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))"); 365 Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
@@ -426,7 +426,7 @@ namespace OpenSim.Data.Tests
426 UserAgentData a2 = db.GetAgentByName(fname2,lname2); 426 UserAgentData a2 = db.GetAgentByName(fname2,lname2);
427 UserAgentData a3 = db.GetAgentByName(name3); 427 UserAgentData a3 = db.GetAgentByName(name3);
428 Assert.That(user2,Is.EqualTo(a2.ProfileID), "Assert.That(user2,Is.EqualTo(a2.ProfileID))"); 428 Assert.That(user2,Is.EqualTo(a2.ProfileID), "Assert.That(user2,Is.EqualTo(a2.ProfileID))");
429 Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))"); 429 Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))");
430 } 430 }
431 431
432 [Test] 432 [Test]
@@ -501,11 +501,11 @@ namespace OpenSim.Data.Tests
501 db.AddNewUserFriend(user1,user3, 2); 501 db.AddNewUserFriend(user1,user3, 2);
502 db.AddNewUserFriend(user1,user2, 4); 502 db.AddNewUserFriend(user1,user2, 4);
503 List<FriendListItem> fl1 = db.GetUserFriendList(user1); 503 List<FriendListItem> fl1 = db.GetUserFriendList(user1);
504 Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))"); 504 Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))");
505 perms.Add(user2,1); 505 perms.Add(user2,1);
506 perms.Add(user3,2); 506 perms.Add(user3,2);
507 for (int i = 0; i < fl1.Count; i++) 507 for (int i = 0; i < fl1.Count; i++)
508 { 508 {
509 Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner), "Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner))"); 509 Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner), "Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner))");
510 friends.Add(fl1[i].Friend,1); 510 friends.Add(fl1[i].Friend,1);
511 temp = perms[fl1[i].Friend]; 511 temp = perms[fl1[i].Friend];
@@ -544,7 +544,7 @@ namespace OpenSim.Data.Tests
544 db.UpdateUserFriendPerms(user1, user3, 4); 544 db.UpdateUserFriendPerms(user1, user3, 4);
545 545
546 fl1 = db.GetUserFriendList(user1); 546 fl1 = db.GetUserFriendList(user1);
547 Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))"); 547 Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))");
548 } 548 }
549 549
550 [Test] 550 [Test]
@@ -560,7 +560,7 @@ namespace OpenSim.Data.Tests
560 [Test] 560 [Test]
561 public void T041_UserAppearancePersistency() 561 public void T041_UserAppearancePersistency()
562 { 562 {
563 AvatarAppearance appear = new AvatarAppearance(); 563 AvatarAppearance appear = new AvatarAppearance();
564 UUID owner = UUID.Random(); 564 UUID owner = UUID.Random();
565 int serial = random.Next(); 565 int serial = random.Next();
566 byte[] visualp = new byte[218]; 566 byte[] visualp = new byte[218];
@@ -698,7 +698,7 @@ namespace OpenSim.Data.Tests
698 int size = random.Next(5,12); 698 int size = random.Next(5,12);
699 char ch ; 699 char ch ;
700 for (int i=0; i<size; i++) 700 for (int i=0; i<size; i++)
701 { 701 {
702 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; 702 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
703 name.Append(ch); 703 name.Append(ch);
704 } 704 }