aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
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
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')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs16
-rw-r--r--OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs2
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;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications; 34using OpenSim.Framework.Communications;
35
36using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
37using OpenSim.Framework.Servers; 36using OpenSim.Framework.Servers;
38using OpenSim.Framework.Servers.HttpServer; 37using 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.