From 7203feb83c3fd4ca7af7ec717ca919fc419bcffd Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 10 Aug 2010 16:50:36 +0100 Subject: Extend DuplicateObject() test to check flags on the duplicated object --- OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index bb6e540..d7da9cb 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs @@ -65,16 +65,18 @@ namespace OpenSim.Region.Framework.Scenes.Tests scene.AddNewSceneObject(so, false); - uint part1LocalId = part1.LocalId; - - SceneObjectGroup duplicatedSo + SceneObjectGroup dupeSo = scene.SceneGraph.DuplicateObject( - part1LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); + part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); + Assert.That(dupeSo.Children.Count, Is.EqualTo(2)); - Assert.That(duplicatedSo.Children.Count, Is.EqualTo(2)); - Assert.That(duplicatedSo.RootPart.LocalId, Is.Not.EqualTo(part1.LocalId)); + SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); + SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); + Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); + Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); - //SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); + Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags)); + Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags)); } } } \ No newline at end of file -- cgit v1.1