From 0cf88b34c9690a5c3d1d9983b59abed3b1e67911 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 29 Jan 2010 21:45:07 +0000 Subject: [PATCH] use common sop2 setup for TestMergeOarV0_2() --- .../World/Archiver/Tests/ArchiverTests.cs | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index ae4aece7b9..c3e57f0574 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -405,11 +405,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests MemoryStream archiveWriteStream = new MemoryStream(); - string part2Name = "objectMerge"; - PrimitiveBaseShape part2Shape = PrimitiveBaseShape.CreateCylinder(); - Vector3 part2GroupPosition = new Vector3(90, 80, 70); - Quaternion part2RotationOffset = new Quaternion(60, 70, 80, 90); - Vector3 part2OffsetPosition = new Vector3(20, 25, 30); +// string part2Name = "objectMerge"; +// PrimitiveBaseShape part2Shape = PrimitiveBaseShape.CreateCylinder(); +// Vector3 part2GroupPosition = new Vector3(90, 80, 70); +// Quaternion part2RotationOffset = new Quaternion(60, 70, 80, 90); +// Vector3 part2OffsetPosition = new Vector3(20, 25, 30); + + SceneObjectPart part2 = CreateSceneObjectPart2(); // Create an oar file that we can use for the merge { @@ -418,15 +420,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests TerrainModule terrainModule = new TerrainModule(); Scene scene = SceneSetupHelpers.SetupScene(); - SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); - - SceneObjectPart part2 - = new SceneObjectPart( - UUID.Zero, part2Shape, part2GroupPosition, part2RotationOffset, part2OffsetPosition); - part2.Name = part2Name; - SceneObjectGroup object2 = new SceneObjectGroup(part2); + SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); - scene.AddNewSceneObject(object2, false); + m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); // Write out this scene scene.EventManager.OnOarFileSaved += SaveCompleted; @@ -453,10 +449,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests Assert.That(object1Existing.Name, Is.EqualTo(part1.Name), "object1 names not identical after merge"); Assert.That(object1Existing.GroupPosition, Is.EqualTo(part1.GroupPosition), "object1 group position not equal after merge"); - SceneObjectPart object2PartMerged = m_scene.GetSceneObjectPart(part2Name); + SceneObjectPart object2PartMerged = m_scene.GetSceneObjectPart(part2.Name); Assert.That(object2PartMerged, Is.Not.Null, "object2 was not present after merge"); - Assert.That(object2PartMerged.Name, Is.EqualTo(part2Name), "object2 names not identical after merge"); - Assert.That(object2PartMerged.GroupPosition, Is.EqualTo(part2GroupPosition), "object2 group position not equal after merge"); + Assert.That(object2PartMerged.Name, Is.EqualTo(part2.Name), "object2 names not identical after merge"); + Assert.That(object2PartMerged.GroupPosition, Is.EqualTo(part2.GroupPosition), "object2 group position not equal after merge"); } } }