diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index 8a103d7..bb6e540 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | |||
@@ -48,22 +48,31 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
48 | TestHelper.InMethod(); | 48 | TestHelper.InMethod(); |
49 | Scene scene = SceneSetupHelpers.SetupScene(); | 49 | Scene scene = SceneSetupHelpers.SetupScene(); |
50 | 50 | ||
51 | UUID ownerUuid = new UUID("00000000-0000-0000-0000-000000000010"); | 51 | UUID ownerId = new UUID("00000000-0000-0000-0000-000000000010"); |
52 | string objName = "obj1"; | 52 | string part1Name = "part1"; |
53 | UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 53 | UUID part1Id = new UUID("00000000-0000-0000-0000-000000000001"); |
54 | string part2Name = "part2"; | ||
55 | UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002"); | ||
54 | 56 | ||
55 | SceneObjectPart part | 57 | SceneObjectPart part1 |
56 | = new SceneObjectPart(ownerUuid, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 58 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
57 | { Name = objName, UUID = objUuid }; | 59 | { Name = part1Name, UUID = part1Id }; |
60 | SceneObjectGroup so = new SceneObjectGroup(part1); | ||
61 | SceneObjectPart part2 | ||
62 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | ||
63 | { Name = part2Name, UUID = part2Id }; | ||
64 | so.AddPart(part2); | ||
58 | 65 | ||
59 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); | 66 | scene.AddNewSceneObject(so, false); |
67 | |||
68 | uint part1LocalId = part1.LocalId; | ||
60 | 69 | ||
61 | SceneObjectGroup duplicatedSo | 70 | SceneObjectGroup duplicatedSo |
62 | = scene.SceneGraph.DuplicateObject( | 71 | = scene.SceneGraph.DuplicateObject( |
63 | part.LocalId, new Vector3(10, 0, 0), 0, ownerUuid, UUID.Zero, Quaternion.Identity); | 72 | part1LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); |
64 | 73 | ||
65 | Assert.That(duplicatedSo.Children.Count, Is.EqualTo(1)); | 74 | Assert.That(duplicatedSo.Children.Count, Is.EqualTo(2)); |
66 | Assert.That(duplicatedSo.RootPart.LocalId, Is.Not.EqualTo(part.LocalId)); | 75 | Assert.That(duplicatedSo.RootPart.LocalId, Is.Not.EqualTo(part1.LocalId)); |
67 | 76 | ||
68 | //SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); | 77 | //SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); |
69 | } | 78 | } |