diff options
author | Justin Clark-Casey (justincc) | 2010-05-21 21:38:47 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-05-21 21:38:47 +0100 |
commit | 8d968249ec02808db18b0d96d94383a7e2b05b03 (patch) | |
tree | 1a0e7665806bce809a96aaf6286c7b54bfd69039 /OpenSim | |
parent | Fix a problem where SceneGraph.AddSceneObject() would return false on success... (diff) | |
download | opensim-SC-8d968249ec02808db18b0d96d94383a7e2b05b03.zip opensim-SC-8d968249ec02808db18b0d96d94383a7e2b05b03.tar.gz opensim-SC-8d968249ec02808db18b0d96d94383a7e2b05b03.tar.bz2 opensim-SC-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 '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | 16 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | 2 |
2 files changed, 13 insertions, 5 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> |
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index ef8ea50..91cf323 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |||
@@ -32,7 +32,6 @@ using Nini.Config; | |||
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Communications; | 34 | using OpenSim.Framework.Communications; |
35 | |||
36 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
37 | using OpenSim.Framework.Servers; | 36 | using OpenSim.Framework.Servers; |
38 | using OpenSim.Framework.Servers.HttpServer; | 37 | using OpenSim.Framework.Servers.HttpServer; |
@@ -115,7 +114,6 @@ namespace OpenSim.Tests.Common.Setup | |||
115 | return SetupScene(name, id, x, y,""); | 114 | return SetupScene(name, id, x, y,""); |
116 | } | 115 | } |
117 | 116 | ||
118 | |||
119 | /// <summary> | 117 | /// <summary> |
120 | /// Set up a scene. If it's more then one scene, use the same CommunicationsManager to link regions | 118 | /// Set up a scene. If it's more then one scene, use the same CommunicationsManager to link regions |
121 | /// or a different, to get a brand new scene with new shared region modules. | 119 | /// or a different, to get a brand new scene with new shared region modules. |