aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/BasicRegionTest.cs
diff options
context:
space:
mode:
authorJeff Ames2009-10-01 01:00:09 +0900
committerJeff Ames2009-10-01 01:17:47 +0900
commitee205e7e812e170f670e690a4e0fa9caa652f226 (patch)
treedf407e66d9aa47a884e39d5d86b877d6ef468a1a /OpenSim/Data/Tests/BasicRegionTest.cs
parentadding LandDataSerializer (not connected anywhere, work-in-progress) (diff)
downloadopensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.zip
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.gz
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.bz2
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.xz
Formatting cleanup.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Tests/BasicRegionTest.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs
index c66ab7c..ca1fcfa 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,7 +492,7 @@ 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());
@@ -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();