refactor: put SOG position test in a separate TestSceneObjectGroupPosition()

0.7.3-extended
Justin Clark-Casey (justincc) 2012-04-14 01:47:56 +01:00
parent a20d1b8f6b
commit f3eb366f24
1 changed files with 17 additions and 1 deletions

View File

@ -44,6 +44,23 @@ namespace OpenSim.Region.Framework.Scenes.Tests
[TestFixture]
public class SceneObjectSpatialTests
{
[Test]
public void TestSceneObjectGroupPosition()
{
TestHelpers.InMethod();
Scene scene = SceneHelpers.SetupScene();
UUID ownerId = TestHelpers.ParseTail(0x1);
Vector3 position = new Vector3(10, 20, 30);
SceneObjectGroup so
= SceneHelpers.CreateSceneObject(1, ownerId, "obj1", 0x10);
so.AbsolutePosition = position;
scene.AddNewSceneObject(so, false);
Assert.That(so.AbsolutePosition, Is.EqualTo(position));
}
[Test]
public void TestGetRootPartPosition()
{
@ -58,7 +75,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
so.AbsolutePosition = partPosition;
scene.AddNewSceneObject(so, false);
Assert.That(so.AbsolutePosition, Is.EqualTo(partPosition));
Assert.That(so.RootPart.AbsolutePosition, Is.EqualTo(partPosition));
Assert.That(so.RootPart.OffsetPosition, Is.EqualTo(Vector3.Zero));
Assert.That(so.RootPart.RelativePosition, Is.EqualTo(partPosition));