aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Tests/BasicRegionTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/Tests/BasicRegionTest.cs')
-rw-r--r--OpenSim/Data/Tests/BasicRegionTest.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs
index 836da78..a746ef0 100644
--- a/OpenSim/Data/Tests/BasicRegionTest.cs
+++ b/OpenSim/Data/Tests/BasicRegionTest.cs
@@ -532,6 +532,53 @@ namespace OpenSim.Data.Tests
532 Assert.That(cursop.Acceleration,Is.EqualTo(parts[i].Acceleration), "Assert.That(cursop.Acceleration,Is.EqualTo(parts[i].Acceleration))"); 532 Assert.That(cursop.Acceleration,Is.EqualTo(parts[i].Acceleration), "Assert.That(cursop.Acceleration,Is.EqualTo(parts[i].Acceleration))");
533 } 533 }
534 } 534 }
535
536 [Test]
537 public void T016_RandomSogWithSceneParts()
538 {
539 UUID tmpSog = UUID.Random();
540 UUID tmp1 = UUID.Random();
541 UUID tmp2 = UUID.Random();
542 UUID tmp3 = UUID.Random();
543 UUID newregion = UUID.Random();
544 SceneObjectPart p1 = new SceneObjectPart();
545 SceneObjectPart p2 = new SceneObjectPart();
546 SceneObjectPart p3 = new SceneObjectPart();
547 p1.Shape = PrimitiveBaseShape.Default;
548 p2.Shape = PrimitiveBaseShape.Default;
549 p3.Shape = PrimitiveBaseShape.Default;
550 ScrambleForTesting.Scramble(p1);
551 ScrambleForTesting.Scramble(p2);
552 ScrambleForTesting.Scramble(p3);
553 p1.UUID = tmp1;
554 p2.UUID = tmp2;
555 p3.UUID = tmp3;
556 SceneObjectGroup sog = NewSOG("Sop 0", tmpSog, newregion);
557 ScrambleForTesting.Scramble(sog);
558 sog.UUID = tmpSog;
559 sog.AddPart(p1);
560 sog.AddPart(p2);
561 sog.AddPart(p3);
562
563 SceneObjectPart[] parts = sog.GetParts();
564 Assert.That(parts.Length, Is.EqualTo(4), "Assert.That(parts.Length,Is.EqualTo(4))");
565
566 db.StoreObject(sog, newregion);
567 List<SceneObjectGroup> sogs = db.LoadObjects(newregion);
568 Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count,Is.EqualTo(1))");
569 SceneObjectGroup newsog = sogs[0];
570
571 SceneObjectPart[] newparts = newsog.GetParts();
572 Assert.That(newparts.Length, Is.EqualTo(4), "Assert.That(newparts.Length,Is.EqualTo(4))");
573
574 Assert.That(newsog, Constraints.PropertyCompareConstraint(sog)
575 .IgnoreProperty(x=>x.LocalId)
576 .IgnoreProperty(x=>x.HasGroupChanged)
577 .IgnoreProperty(x=>x.IsSelected)
578 .IgnoreProperty(x=>x.RegionHandle)
579 .IgnoreProperty(x=>x.Scene)
580 .IgnoreProperty(x=>x.RootPart.InventorySerial));
581 }
535 582
536 [Test] 583 [Test]
537 public void T020_PrimInventoryEmpty() 584 public void T020_PrimInventoryEmpty()