extend TestAddSceneObject() to check Scene.AddNewSceneObject() return boolean
improve test to retrieve object by known uuid rather than dynamically assigned local idsoprefactor
parent
f83acf533b
commit
8d968249ec
|
@ -55,12 +55,22 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||
TestHelper.InMethod();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
|
||||
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
||||
|
||||
string objName = "obj1";
|
||||
UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001");
|
||||
|
||||
SceneObjectPart part
|
||||
= new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
|
||||
{ Name = objName, UUID = objUuid };
|
||||
|
||||
Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part), false), Is.True);
|
||||
|
||||
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid);
|
||||
|
||||
//m_log.Debug("retrievedPart : {0}", retrievedPart);
|
||||
// If the parts have the same UUID then we will consider them as one and the same
|
||||
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
|
||||
Assert.That(retrievedPart.Name, Is.EqualTo(objName));
|
||||
Assert.That(retrievedPart.UUID, Is.EqualTo(objUuid));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -32,7 +32,6 @@ using Nini.Config;
|
|||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications;
|
||||
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
|
@ -115,7 +114,6 @@ namespace OpenSim.Tests.Common.Setup
|
|||
return SetupScene(name, id, x, y,"");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Set up a scene. If it's more then one scene, use the same CommunicationsManager to link regions
|
||||
/// or a different, to get a brand new scene with new shared region modules.
|
||||
|
|
Loading…
Reference in New Issue