aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-05-21 21:38:47 +0100
committerJustin Clark-Casey (justincc)2010-05-21 21:38:47 +0100
commit8d968249ec02808db18b0d96d94383a7e2b05b03 (patch)
tree1a0e7665806bce809a96aaf6286c7b54bfd69039 /OpenSim/Region/Framework/Scenes
parentFix a problem where SceneGraph.AddSceneObject() would return false on success... (diff)
downloadopensim-SC_OLD-8d968249ec02808db18b0d96d94383a7e2b05b03.zip
opensim-SC_OLD-8d968249ec02808db18b0d96d94383a7e2b05b03.tar.gz
opensim-SC_OLD-8d968249ec02808db18b0d96d94383a7e2b05b03.tar.bz2
opensim-SC_OLD-8d968249ec02808db18b0d96d94383a7e2b05b03.tar.xz
extend TestAddSceneObject() to check Scene.AddNewSceneObject() return boolean
improve test to retrieve object by known uuid rather than dynamically assigned local id
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs16
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 78f2ae3..4fe4a6a 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -55,12 +55,22 @@ namespace OpenSim.Region.Framework.Scenes.Tests
55 TestHelper.InMethod(); 55 TestHelper.InMethod();
56 56
57 Scene scene = SceneSetupHelpers.SetupScene(); 57 Scene scene = SceneSetupHelpers.SetupScene();
58 SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); 58
59 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 59 string objName = "obj1";
60 UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001");
61
62 SceneObjectPart part
63 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
64 { Name = objName, UUID = objUuid };
65
66 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part), false), Is.True);
67
68 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid);
60 69
61 //m_log.Debug("retrievedPart : {0}", retrievedPart); 70 //m_log.Debug("retrievedPart : {0}", retrievedPart);
62 // If the parts have the same UUID then we will consider them as one and the same 71 // If the parts have the same UUID then we will consider them as one and the same
63 Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); 72 Assert.That(retrievedPart.Name, Is.EqualTo(objName));
73 Assert.That(retrievedPart.UUID, Is.EqualTo(objUuid));
64 } 74 }
65 75
66 /// <summary> 76 /// <summary>