aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs102
1 files changed, 50 insertions, 52 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 9c95e78..e434e46 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -38,7 +38,6 @@ using OpenSim.Framework;
38using OpenSim.Framework.Serialization; 38using OpenSim.Framework.Serialization;
39using OpenSim.Framework.Serialization.External; 39using OpenSim.Framework.Serialization.External;
40using OpenSim.Framework.Communications; 40using OpenSim.Framework.Communications;
41
42using OpenSim.Framework.Communications.Osp; 41using OpenSim.Framework.Communications.Osp;
43using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver; 42using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
44using OpenSim.Region.CoreModules.World.Serialiser; 43using OpenSim.Region.CoreModules.World.Serialiser;
@@ -541,56 +540,55 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
541 /// <summary> 540 /// <summary>
542 /// Test replication of an archive path to the user's inventory. 541 /// Test replication of an archive path to the user's inventory.
543 /// </summary> 542 /// </summary>
544 //[Test] 543// [Test]
545 //public void TestReplicateArchivePathToUserInventory() 544// public void TestReplicateArchivePathToUserInventory()
546 //{ 545// {
547 // TestHelper.InMethod(); 546// TestHelper.InMethod();
548 547// //log4net.Config.XmlConfigurator.Configure();
549 // //log4net.Config.XmlConfigurator.Configure(); 548//
550 549// Scene scene = SceneSetupHelpers.SetupScene("inventory");
551 // Scene scene = SceneSetupHelpers.SetupScene("inventory"); 550// CommunicationsManager commsManager = scene.CommsManager;
552 // CommunicationsManager commsManager = scene.CommsManager; 551// CachedUserInfo userInfo;
553 // CachedUserInfo userInfo; 552//
554 553// lock (this)
555 // lock (this) 554// {
556 // { 555// // !!! REFACTORING PROBLEM. This needs to be rewritten
557 // // !!! REFACTORING PROBLEM. This needs to be rewritten 556// userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager, InventoryReceived);
558 // userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager, InventoryReceived); 557// Monitor.Wait(this, 60000);
559 // Monitor.Wait(this, 60000); 558// }
560 // } 559//
561 560// //Console.WriteLine("userInfo.RootFolder 1: {0}", userInfo.RootFolder);
562 // //Console.WriteLine("userInfo.RootFolder 1: {0}", userInfo.RootFolder); 561//
563 562// Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>();
564 // Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); 563// List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>();
565 // List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>(); 564//
566 565// string folder1Name = "a";
567 // string folder1Name = "a"; 566// string folder2Name = "b";
568 // string folder2Name = "b"; 567// string itemName = "c.lsl";
569 // string itemName = "c.lsl"; 568//
570 569// string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random());
571 // string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random()); 570// string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
572 // string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); 571// string itemArchiveName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random());
573 // string itemArchiveName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random()); 572//
574 573// string itemArchivePath
575 // string itemArchivePath 574// = string.Format(
576 // = string.Format( 575// "{0}{1}{2}{3}",
577 // "{0}{1}{2}{3}", 576// ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemArchiveName);
578 // ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemArchiveName); 577//
579 578// //Console.WriteLine("userInfo.RootFolder 2: {0}", userInfo.RootFolder);
580 // //Console.WriteLine("userInfo.RootFolder 2: {0}", userInfo.RootFolder); 579//
581 580// new InventoryArchiveReadRequest(scene, userInfo, null, (Stream)null)
582 // new InventoryArchiveReadRequest(scene, userInfo, null, (Stream)null) 581// .ReplicateArchivePathToUserInventory(
583 // .ReplicateArchivePathToUserInventory( 582// itemArchivePath, false, scene.InventoryService.GetRootFolder(userInfo.UserProfile.ID),
584 // itemArchivePath, false, scene.InventoryService.GetRootFolder(userInfo.UserProfile.ID), 583// foldersCreated, nodesLoaded);
585 // foldersCreated, nodesLoaded); 584//
586 585// //Console.WriteLine("userInfo.RootFolder 3: {0}", userInfo.RootFolder);
587 // //Console.WriteLine("userInfo.RootFolder 3: {0}", userInfo.RootFolder); 586// //InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a");
588 // //InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a"); 587// InventoryFolderBase folder1
589 // InventoryFolderBase folder1 588// = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userInfo.UserProfile.ID, "a");
590 // = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userInfo.UserProfile.ID, "a"); 589// Assert.That(folder1, Is.Not.Null, "Could not find folder a");
591 // Assert.That(folder1, Is.Not.Null, "Could not find folder a"); 590// InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b");
592 // InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b"); 591// Assert.That(folder2, Is.Not.Null, "Could not find folder b");
593 // Assert.That(folder2, Is.Not.Null, "Could not find folder b"); 592// }
594 //}
595 } 593 }
596} 594}