diff options
author | Justin Clark-Casey (justincc) | 2012-04-14 01:47:56 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-14 01:47:56 +0100 |
commit | 317aebcce6618cacbe3afd831c3e100b96665be2 (patch) | |
tree | abfc0422f63776ecc28bc9e9e421020fdf54f19c /OpenSim/Region | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-317aebcce6618cacbe3afd831c3e100b96665be2.zip opensim-SC_OLD-317aebcce6618cacbe3afd831c3e100b96665be2.tar.gz opensim-SC_OLD-317aebcce6618cacbe3afd831c3e100b96665be2.tar.bz2 opensim-SC_OLD-317aebcce6618cacbe3afd831c3e100b96665be2.tar.xz |
refactor: put SOG position test in a separate TestSceneObjectGroupPosition()
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs | 18 |
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)); |