aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 4fe4a6a..39f8acf 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -72,6 +72,40 @@ namespace OpenSim.Region.Framework.Scenes.Tests
72 Assert.That(retrievedPart.Name, Is.EqualTo(objName)); 72 Assert.That(retrievedPart.Name, Is.EqualTo(objName));
73 Assert.That(retrievedPart.UUID, Is.EqualTo(objUuid)); 73 Assert.That(retrievedPart.UUID, Is.EqualTo(objUuid));
74 } 74 }
75
76 [Test]
77 /// <summary>
78 /// It shouldn't be possible to add a scene object if one with that uuid already exists in the scene.
79 /// </summary>
80 public void TestAddExistingSceneObjectUuid()
81 {
82 TestHelper.InMethod();
83
84 Scene scene = SceneSetupHelpers.SetupScene();
85
86 string obj1Name = "Alfred";
87 string obj2Name = "Betty";
88 UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001");
89
90 SceneObjectPart part1
91 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
92 { Name = obj1Name, UUID = objUuid };
93
94 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True);
95
96 SceneObjectPart part2
97 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
98 { Name = obj2Name, UUID = objUuid };
99
100 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part2), false), Is.False);
101
102 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid);
103
104 //m_log.Debug("retrievedPart : {0}", retrievedPart);
105 // If the parts have the same UUID then we will consider them as one and the same
106 Assert.That(retrievedPart.Name, Is.EqualTo(obj1Name));
107 Assert.That(retrievedPart.UUID, Is.EqualTo(objUuid));
108 }
75 109
76 /// <summary> 110 /// <summary>
77 /// Test deleting an object from a scene. 111 /// Test deleting an object from a scene.