diff options
author | Diva Canto | 2009-08-17 05:55:38 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-17 05:55:38 -0700 |
commit | fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9 (patch) | |
tree | 7bee741b06e6732fae848bef3c6b7f808ab3349a /OpenSim/Data/Tests/BasicRegionTest.cs | |
parent | Bumped up grid services interface number. (diff) | |
parent | Add System.Xml reference to the console project (diff) | |
download | opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.zip opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.gz opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.bz2 opensim-SC-fa8a94577a2f38145da0c8a1f6d1c72c4f339ed9.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Data/Tests/BasicRegionTest.cs')
-rw-r--r-- | OpenSim/Data/Tests/BasicRegionTest.cs | 65 |
1 files changed, 57 insertions, 8 deletions
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index 836da78..8474921 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.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 | 75 | ||
83 | region1 = UUID.Random(); | 76 | region1 = UUID.Random(); |
84 | region3 = UUID.Random(); | 77 | region3 = UUID.Random(); |
@@ -532,6 +525,62 @@ namespace OpenSim.Data.Tests | |||
532 | Assert.That(cursop.Acceleration,Is.EqualTo(parts[i].Acceleration), "Assert.That(cursop.Acceleration,Is.EqualTo(parts[i].Acceleration))"); | 525 | Assert.That(cursop.Acceleration,Is.EqualTo(parts[i].Acceleration), "Assert.That(cursop.Acceleration,Is.EqualTo(parts[i].Acceleration))"); |
533 | } | 526 | } |
534 | } | 527 | } |
528 | |||
529 | [Test] | ||
530 | public void T016_RandomSogWithSceneParts() | ||
531 | { | ||
532 | PropertyScrambler<SceneObjectPart> scrambler = | ||
533 | new PropertyScrambler<SceneObjectPart>() | ||
534 | .DontScramble(x => x.UUID); | ||
535 | UUID tmpSog = UUID.Random(); | ||
536 | UUID tmp1 = UUID.Random(); | ||
537 | UUID tmp2 = UUID.Random(); | ||
538 | UUID tmp3 = UUID.Random(); | ||
539 | UUID newregion = UUID.Random(); | ||
540 | SceneObjectPart p1 = new SceneObjectPart(); | ||
541 | SceneObjectPart p2 = new SceneObjectPart(); | ||
542 | SceneObjectPart p3 = new SceneObjectPart(); | ||
543 | p1.Shape = PrimitiveBaseShape.Default; | ||
544 | p2.Shape = PrimitiveBaseShape.Default; | ||
545 | p3.Shape = PrimitiveBaseShape.Default; | ||
546 | p1.UUID = tmp1; | ||
547 | p2.UUID = tmp2; | ||
548 | p3.UUID = tmp3; | ||
549 | scrambler.Scramble(p1); | ||
550 | scrambler.Scramble(p2); | ||
551 | scrambler.Scramble(p3); | ||
552 | |||
553 | SceneObjectGroup sog = NewSOG("Sop 0", tmpSog, newregion); | ||
554 | PropertyScrambler<SceneObjectGroup> sogScrambler = | ||
555 | new PropertyScrambler<SceneObjectGroup>() | ||
556 | .DontScramble(x => x.UUID); | ||
557 | sogScrambler.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.RegionUUID) | ||
580 | .IgnoreProperty(x=>x.Scene) | ||
581 | .IgnoreProperty(x=>x.Children) | ||
582 | .IgnoreProperty(x=>x.RootPart)); | ||
583 | } | ||
535 | 584 | ||
536 | [Test] | 585 | [Test] |
537 | public void T020_PrimInventoryEmpty() | 586 | public void T020_PrimInventoryEmpty() |