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

0.7.4.1
Justin Clark-Casey (justincc) 2012-04-14 01:47:56 +01:00
parent 40d01fb20b
commit 317aebcce6
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));