aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-01-29 21:45:07 +0000
committerJustin Clark-Casey (justincc)2010-01-29 21:45:07 +0000
commit0cf88b34c9690a5c3d1d9983b59abed3b1e67911 (patch)
tree07e15d05b4ab3d2d0d575ec98ff295f07038173e /OpenSim/Region
parentmake TestSaveOarV0_2() use a common part2 construction (diff)
downloadopensim-SC_OLD-0cf88b34c9690a5c3d1d9983b59abed3b1e67911.zip
opensim-SC_OLD-0cf88b34c9690a5c3d1d9983b59abed3b1e67911.tar.gz
opensim-SC_OLD-0cf88b34c9690a5c3d1d9983b59abed3b1e67911.tar.bz2
opensim-SC_OLD-0cf88b34c9690a5c3d1d9983b59abed3b1e67911.tar.xz
use common sop2 setup for TestMergeOarV0_2()
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs28
1 files 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 ae4aece..c3e57f0 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
405 405
406 MemoryStream archiveWriteStream = new MemoryStream(); 406 MemoryStream archiveWriteStream = new MemoryStream();
407 407
408 string part2Name = "objectMerge"; 408// string part2Name = "objectMerge";
409 PrimitiveBaseShape part2Shape = PrimitiveBaseShape.CreateCylinder(); 409// PrimitiveBaseShape part2Shape = PrimitiveBaseShape.CreateCylinder();
410 Vector3 part2GroupPosition = new Vector3(90, 80, 70); 410// Vector3 part2GroupPosition = new Vector3(90, 80, 70);
411 Quaternion part2RotationOffset = new Quaternion(60, 70, 80, 90); 411// Quaternion part2RotationOffset = new Quaternion(60, 70, 80, 90);
412 Vector3 part2OffsetPosition = new Vector3(20, 25, 30); 412// Vector3 part2OffsetPosition = new Vector3(20, 25, 30);
413
414 SceneObjectPart part2 = CreateSceneObjectPart2();
413 415
414 // Create an oar file that we can use for the merge 416 // Create an oar file that we can use for the merge
415 { 417 {
@@ -418,15 +420,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
418 TerrainModule terrainModule = new TerrainModule(); 420 TerrainModule terrainModule = new TerrainModule();
419 421
420 Scene scene = SceneSetupHelpers.SetupScene(); 422 Scene scene = SceneSetupHelpers.SetupScene();
421 SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); 423 SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule);
422
423 SceneObjectPart part2
424 = new SceneObjectPart(
425 UUID.Zero, part2Shape, part2GroupPosition, part2RotationOffset, part2OffsetPosition);
426 part2.Name = part2Name;
427 SceneObjectGroup object2 = new SceneObjectGroup(part2);
428 424
429 scene.AddNewSceneObject(object2, false); 425 m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
430 426
431 // Write out this scene 427 // Write out this scene
432 scene.EventManager.OnOarFileSaved += SaveCompleted; 428 scene.EventManager.OnOarFileSaved += SaveCompleted;
@@ -453,10 +449,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
453 Assert.That(object1Existing.Name, Is.EqualTo(part1.Name), "object1 names not identical after merge"); 449 Assert.That(object1Existing.Name, Is.EqualTo(part1.Name), "object1 names not identical after merge");
454 Assert.That(object1Existing.GroupPosition, Is.EqualTo(part1.GroupPosition), "object1 group position not equal after merge"); 450 Assert.That(object1Existing.GroupPosition, Is.EqualTo(part1.GroupPosition), "object1 group position not equal after merge");
455 451
456 SceneObjectPart object2PartMerged = m_scene.GetSceneObjectPart(part2Name); 452 SceneObjectPart object2PartMerged = m_scene.GetSceneObjectPart(part2.Name);
457 Assert.That(object2PartMerged, Is.Not.Null, "object2 was not present after merge"); 453 Assert.That(object2PartMerged, Is.Not.Null, "object2 was not present after merge");
458 Assert.That(object2PartMerged.Name, Is.EqualTo(part2Name), "object2 names not identical after merge"); 454 Assert.That(object2PartMerged.Name, Is.EqualTo(part2.Name), "object2 names not identical after merge");
459 Assert.That(object2PartMerged.GroupPosition, Is.EqualTo(part2GroupPosition), "object2 group position not equal after merge"); 455 Assert.That(object2PartMerged.GroupPosition, Is.EqualTo(part2.GroupPosition), "object2 group position not equal after merge");
460 } 456 }
461 } 457 }
462 } 458 }