aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
index 19526c0..3509de1 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
@@ -45,6 +45,23 @@ namespace OpenSim.Region.Framework.Scenes.Tests
45 public class SceneObjectSpatialTests 45 public class SceneObjectSpatialTests
46 { 46 {
47 [Test] 47 [Test]
48 public void TestSceneObjectGroupPosition()
49 {
50 TestHelpers.InMethod();
51
52 Scene scene = SceneHelpers.SetupScene();
53 UUID ownerId = TestHelpers.ParseTail(0x1);
54 Vector3 position = new Vector3(10, 20, 30);
55
56 SceneObjectGroup so
57 = SceneHelpers.CreateSceneObject(1, ownerId, "obj1", 0x10);
58 so.AbsolutePosition = position;
59 scene.AddNewSceneObject(so, false);
60
61 Assert.That(so.AbsolutePosition, Is.EqualTo(position));
62 }
63
64 [Test]
48 public void TestGetRootPartPosition() 65 public void TestGetRootPartPosition()
49 { 66 {
50 TestHelpers.InMethod(); 67 TestHelpers.InMethod();
@@ -58,7 +75,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
58 so.AbsolutePosition = partPosition; 75 so.AbsolutePosition = partPosition;
59 scene.AddNewSceneObject(so, false); 76 scene.AddNewSceneObject(so, false);
60 77
61 Assert.That(so.AbsolutePosition, Is.EqualTo(partPosition));
62 Assert.That(so.RootPart.AbsolutePosition, Is.EqualTo(partPosition)); 78 Assert.That(so.RootPart.AbsolutePosition, Is.EqualTo(partPosition));
63 Assert.That(so.RootPart.OffsetPosition, Is.EqualTo(Vector3.Zero)); 79 Assert.That(so.RootPart.OffsetPosition, Is.EqualTo(Vector3.Zero));
64 Assert.That(so.RootPart.RelativePosition, Is.EqualTo(partPosition)); 80 Assert.That(so.RootPart.RelativePosition, Is.EqualTo(partPosition));