refactor: put SOG position test in a separate TestSceneObjectGroupPosition()
parent
40d01fb20b
commit
317aebcce6
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue