diff options
author | Melanie | 2009-10-02 08:23:38 +0100 |
---|---|---|
committer | Melanie | 2009-10-02 08:23:38 +0100 |
commit | 31d8cec0f8cd47ff445edc7771e5e73825a57927 (patch) | |
tree | a2d60604317739fa530502c40ffc71bab2a5c494 /OpenSim/Data/Tests | |
parent | Restore the missing image handling to the image manager. The missing (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-31d8cec0f8cd47ff445edc7771e5e73825a57927.zip opensim-SC-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.gz opensim-SC-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.bz2 opensim-SC-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.xz |
Merge branch 'master' into diva-textures
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/Tests/BasicRegionTest.cs | 38 | ||||
-rw-r--r-- | OpenSim/Data/Tests/BasicUserTest.cs | 22 |
2 files changed, 30 insertions, 30 deletions
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index c66ab7c..97990e1 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Data.Tests | |||
60 | public UUID item2; | 60 | public UUID item2; |
61 | public UUID item3; | 61 | public UUID item3; |
62 | 62 | ||
63 | public static Random random; | 63 | public static Random random; |
64 | 64 | ||
65 | public string itemname1 = "item1"; | 65 | public string itemname1 = "item1"; |
66 | 66 | ||
@@ -173,7 +173,7 @@ namespace OpenSim.Data.Tests | |||
173 | UUID tmp0 = UUID.Random(); | 173 | UUID tmp0 = UUID.Random(); |
174 | UUID tmp1 = UUID.Random(); | 174 | UUID tmp1 = UUID.Random(); |
175 | UUID tmp2 = UUID.Random(); | 175 | UUID tmp2 = UUID.Random(); |
176 | UUID tmp3 = UUID.Random(); | 176 | UUID tmp3 = UUID.Random(); |
177 | UUID newregion = UUID.Random(); | 177 | UUID newregion = UUID.Random(); |
178 | SceneObjectPart p1 = NewSOP("SoP 1",tmp1); | 178 | SceneObjectPart p1 = NewSOP("SoP 1",tmp1); |
179 | SceneObjectPart p2 = NewSOP("SoP 2",tmp2); | 179 | SceneObjectPart p2 = NewSOP("SoP 2",tmp2); |
@@ -224,7 +224,7 @@ namespace OpenSim.Data.Tests | |||
224 | random.NextBytes(partsys); | 224 | random.NextBytes(partsys); |
225 | DateTime expires = new DateTime(2008, 12, 20); | 225 | DateTime expires = new DateTime(2008, 12, 20); |
226 | DateTime rezzed = new DateTime(2009, 07, 15); | 226 | DateTime rezzed = new DateTime(2009, 07, 15); |
227 | Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); | 227 | Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); |
228 | Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); | 228 | Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); |
229 | Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); | 229 | Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); |
230 | Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); | 230 | Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); |
@@ -261,7 +261,7 @@ namespace OpenSim.Data.Tests | |||
261 | sop.Shape = pbshap; | 261 | sop.Shape = pbshap; |
262 | sop.GroupPosition = groupos; | 262 | sop.GroupPosition = groupos; |
263 | sop.RotationOffset = rotoff; | 263 | sop.RotationOffset = rotoff; |
264 | sop.CreatorID = creator; | 264 | sop.CreatorID = creator; |
265 | sop.InventorySerial = iserial; | 265 | sop.InventorySerial = iserial; |
266 | sop.TaskInventory = dic; | 266 | sop.TaskInventory = dic; |
267 | sop.ObjectFlags = objf; | 267 | sop.ObjectFlags = objf; |
@@ -306,7 +306,7 @@ namespace OpenSim.Data.Tests | |||
306 | Assert.That(expires,Is.EqualTo(sop.Expires), "Assert.That(expires,Is.EqualTo(sop.Expires))"); | 306 | Assert.That(expires,Is.EqualTo(sop.Expires), "Assert.That(expires,Is.EqualTo(sop.Expires))"); |
307 | Assert.That(rezzed,Is.EqualTo(sop.Rezzed), "Assert.That(rezzed,Is.EqualTo(sop.Rezzed))"); | 307 | Assert.That(rezzed,Is.EqualTo(sop.Rezzed), "Assert.That(rezzed,Is.EqualTo(sop.Rezzed))"); |
308 | Assert.That(offset,Is.EqualTo(sop.OffsetPosition), "Assert.That(offset,Is.EqualTo(sop.OffsetPosition))"); | 308 | Assert.That(offset,Is.EqualTo(sop.OffsetPosition), "Assert.That(offset,Is.EqualTo(sop.OffsetPosition))"); |
309 | Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))"); | 309 | Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))"); |
310 | Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity), "Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity))"); | 310 | Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity), "Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity))"); |
311 | Assert.That(accel,Is.EqualTo(sop.Acceleration), "Assert.That(accel,Is.EqualTo(sop.Acceleration))"); | 311 | Assert.That(accel,Is.EqualTo(sop.Acceleration), "Assert.That(accel,Is.EqualTo(sop.Acceleration))"); |
312 | Assert.That(description,Is.EqualTo(sop.Description), "Assert.That(description,Is.EqualTo(sop.Description))"); | 312 | Assert.That(description,Is.EqualTo(sop.Description), "Assert.That(description,Is.EqualTo(sop.Description))"); |
@@ -319,7 +319,7 @@ namespace OpenSim.Data.Tests | |||
319 | Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))"); | 319 | Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))"); |
320 | Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))"); | 320 | Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))"); |
321 | 321 | ||
322 | // This is necessary or object will not be inserted in DB | 322 | // This is necessary or object will not be inserted in DB |
323 | sop.ObjectFlags = 0; | 323 | sop.ObjectFlags = 0; |
324 | 324 | ||
325 | SceneObjectGroup sog = new SceneObjectGroup(sop); | 325 | SceneObjectGroup sog = new SceneObjectGroup(sop); |
@@ -332,11 +332,11 @@ namespace OpenSim.Data.Tests | |||
332 | // Makes sure there are no double insertions: | 332 | // Makes sure there are no double insertions: |
333 | db.StoreObject(sog,region3); | 333 | db.StoreObject(sog,region3); |
334 | sogs = db.LoadObjects(region3); | 334 | sogs = db.LoadObjects(region3); |
335 | Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))"); | 335 | Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))"); |
336 | 336 | ||
337 | 337 | ||
338 | // Tests if the parameters were inserted correctly | 338 | // Tests if the parameters were inserted correctly |
339 | SceneObjectPart p = sogs[0].RootPart; | 339 | SceneObjectPart p = sogs[0].RootPart; |
340 | Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))"); | 340 | Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))"); |
341 | //Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))"); | 341 | //Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))"); |
342 | Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))"); | 342 | Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))"); |
@@ -402,7 +402,7 @@ namespace OpenSim.Data.Tests | |||
402 | random.NextBytes(partsys); | 402 | random.NextBytes(partsys); |
403 | DateTime expires = new DateTime(2010, 12, 20); | 403 | DateTime expires = new DateTime(2010, 12, 20); |
404 | DateTime rezzed = new DateTime(2005, 07, 15); | 404 | DateTime rezzed = new DateTime(2005, 07, 15); |
405 | Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); | 405 | Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); |
406 | Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); | 406 | Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); |
407 | Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); | 407 | Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); |
408 | Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); | 408 | Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); |
@@ -418,7 +418,7 @@ namespace OpenSim.Data.Tests | |||
418 | PrimitiveBaseShape pbshap = new PrimitiveBaseShape(); | 418 | PrimitiveBaseShape pbshap = new PrimitiveBaseShape(); |
419 | pbshap = PrimitiveBaseShape.Default; | 419 | pbshap = PrimitiveBaseShape.Default; |
420 | Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next()); | 420 | Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next()); |
421 | byte updatef = (byte) random.Next(127); | 421 | byte updatef = (byte) random.Next(127); |
422 | 422 | ||
423 | // Updates the region with new values | 423 | // Updates the region with new values |
424 | SceneObjectGroup sog2 = FindSOG("Adam West", region3); | 424 | SceneObjectGroup sog2 = FindSOG("Adam West", region3); |
@@ -427,7 +427,7 @@ namespace OpenSim.Data.Tests | |||
427 | sog2.RootPart.Shape = pbshap; | 427 | sog2.RootPart.Shape = pbshap; |
428 | sog2.RootPart.GroupPosition = groupos; | 428 | sog2.RootPart.GroupPosition = groupos; |
429 | sog2.RootPart.RotationOffset = rotoff; | 429 | sog2.RootPart.RotationOffset = rotoff; |
430 | sog2.RootPart.CreatorID = creator; | 430 | sog2.RootPart.CreatorID = creator; |
431 | sog2.RootPart.TaskInventory = dic; | 431 | sog2.RootPart.TaskInventory = dic; |
432 | sog2.RootPart.Name = name; | 432 | sog2.RootPart.Name = name; |
433 | sog2.RootPart.Material = material; | 433 | sog2.RootPart.Material = material; |
@@ -492,12 +492,12 @@ namespace OpenSim.Data.Tests | |||
492 | { | 492 | { |
493 | UUID tmp = UUID.Random(); | 493 | UUID tmp = UUID.Random(); |
494 | SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp); | 494 | SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp); |
495 | Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); | 495 | Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); |
496 | Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); | 496 | Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); |
497 | Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); | 497 | Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); |
498 | Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); | 498 | Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); |
499 | Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next()); | 499 | Vector3 angvelo = new Vector3(random.Next(),random.Next(),random.Next()); |
500 | Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next()); | 500 | Vector3 accel = new Vector3(random.Next(),random.Next(),random.Next()); |
501 | 501 | ||
502 | sop.GroupPosition = groupos; | 502 | sop.GroupPosition = groupos; |
503 | sop.RotationOffset = rotoff; | 503 | sop.RotationOffset = rotoff; |
@@ -648,7 +648,7 @@ namespace OpenSim.Data.Tests | |||
648 | { | 648 | { |
649 | InventoryItemBase i = new InventoryItemBase(); | 649 | InventoryItemBase i = new InventoryItemBase(); |
650 | UUID id = UUID.Random(); | 650 | UUID id = UUID.Random(); |
651 | i.ID = id; | 651 | i.ID = id; |
652 | UUID folder = UUID.Random(); | 652 | UUID folder = UUID.Random(); |
653 | i.Folder = folder; | 653 | i.Folder = folder; |
654 | UUID owner = UUID.Random(); | 654 | UUID owner = UUID.Random(); |
@@ -666,13 +666,13 @@ namespace OpenSim.Data.Tests | |||
666 | i.NextPermissions = nextperm; | 666 | i.NextPermissions = nextperm; |
667 | uint curperm = (uint) random.Next(); | 667 | uint curperm = (uint) random.Next(); |
668 | i.CurrentPermissions = curperm; | 668 | i.CurrentPermissions = curperm; |
669 | uint baseperm = (uint) random.Next(); | 669 | uint baseperm = (uint) random.Next(); |
670 | i.BasePermissions = baseperm; | 670 | i.BasePermissions = baseperm; |
671 | uint eoperm = (uint) random.Next(); | 671 | uint eoperm = (uint) random.Next(); |
672 | i.EveryOnePermissions = eoperm; | 672 | i.EveryOnePermissions = eoperm; |
673 | int assettype = random.Next(); | 673 | int assettype = random.Next(); |
674 | i.AssetType = assettype; | 674 | i.AssetType = assettype; |
675 | UUID groupid = UUID.Random(); | 675 | UUID groupid = UUID.Random(); |
676 | i.GroupID = groupid; | 676 | i.GroupID = groupid; |
677 | bool groupown = true; | 677 | bool groupown = true; |
678 | i.GroupOwned = groupown; | 678 | i.GroupOwned = groupown; |
@@ -1010,7 +1010,7 @@ namespace OpenSim.Data.Tests | |||
1010 | 1010 | ||
1011 | private SceneObjectPart NewSOP(string name, UUID uuid) | 1011 | private SceneObjectPart NewSOP(string name, UUID uuid) |
1012 | { | 1012 | { |
1013 | SceneObjectPart sop = new SceneObjectPart(); | 1013 | SceneObjectPart sop = new SceneObjectPart(); |
1014 | sop.Name = name; | 1014 | sop.Name = name; |
1015 | sop.Description = name; | 1015 | sop.Description = name; |
1016 | sop.Text = RandomName(); | 1016 | sop.Text = RandomName(); |
@@ -1042,12 +1042,12 @@ namespace OpenSim.Data.Tests | |||
1042 | int size = random.Next(5,12); | 1042 | int size = random.Next(5,12); |
1043 | char ch ; | 1043 | char ch ; |
1044 | for (int i=0; i<size; i++) | 1044 | for (int i=0; i<size; i++) |
1045 | { | 1045 | { |
1046 | ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; | 1046 | ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; |
1047 | name.Append(ch); | 1047 | name.Append(ch); |
1048 | } | 1048 | } |
1049 | return name.ToString(); | 1049 | return name.ToString(); |
1050 | } | 1050 | } |
1051 | // private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name) | 1051 | // private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name) |
1052 | // { | 1052 | // { |
1053 | // InventoryFolderBase f = new InventoryFolderBase(); | 1053 | // InventoryFolderBase f = new InventoryFolderBase(); |
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 | } |