aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-10 16:16:57 +0100
committerJustin Clark-Casey (justincc)2010-08-10 16:16:57 +0100
commit85fc2dfe3c9c8fc1881833385d13e1c6aae13fe9 (patch)
tree9ac05ae603a3c4b711694061c89bb38874789b64 /OpenSim/Region/Framework/Scenes
parentHandle incoming ObjectImage (TextureEntry) updates synchronously rather than ... (diff)
downloadopensim-SC-85fc2dfe3c9c8fc1881833385d13e1c6aae13fe9.zip
opensim-SC-85fc2dfe3c9c8fc1881833385d13e1c6aae13fe9.tar.gz
opensim-SC-85fc2dfe3c9c8fc1881833385d13e1c6aae13fe9.tar.bz2
opensim-SC-85fc2dfe3c9c8fc1881833385d13e1c6aae13fe9.tar.xz
extend TestDuplicateObject() to a two prim object
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs29
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 }