diff options
author | Justin Clark-Casey (justincc) | 2010-05-28 21:37:48 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-05-28 21:37:48 +0100 |
commit | a60ca5236c247b88909a3c0462675627575b334c (patch) | |
tree | 1de95f0347da5e5566305561f30bbc601e7c0496 /OpenSim/Region | |
parent | minor: move a method so that the #regions make more sense (diff) | |
download | opensim-SC_OLD-a60ca5236c247b88909a3c0462675627575b334c.zip opensim-SC_OLD-a60ca5236c247b88909a3c0462675627575b334c.tar.gz opensim-SC_OLD-a60ca5236c247b88909a3c0462675627575b334c.tar.bz2 opensim-SC_OLD-a60ca5236c247b88909a3c0462675627575b334c.tar.xz |
restore InventoryArchiverTests.TestReplicateArchivePathToUserInventory() to work with the new UserAccountService/InventoryService
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 88 |
1 files changed, 37 insertions, 51 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index e434e46..d339543 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -540,55 +540,41 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
540 | /// <summary> | 540 | /// <summary> |
541 | /// Test replication of an archive path to the user's inventory. | 541 | /// Test replication of an archive path to the user's inventory. |
542 | /// </summary> | 542 | /// </summary> |
543 | // [Test] | 543 | [Test] |
544 | // public void TestReplicateArchivePathToUserInventory() | 544 | public void TestReplicateArchivePathToUserInventory() |
545 | // { | 545 | { |
546 | // TestHelper.InMethod(); | 546 | TestHelper.InMethod(); |
547 | // //log4net.Config.XmlConfigurator.Configure(); | 547 | //log4net.Config.XmlConfigurator.Configure(); |
548 | // | 548 | |
549 | // Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 549 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); |
550 | // CommunicationsManager commsManager = scene.CommsManager; | 550 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); |
551 | // CachedUserInfo userInfo; | 551 | |
552 | // | 552 | Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); |
553 | // lock (this) | 553 | List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>(); |
554 | // { | 554 | |
555 | // // !!! REFACTORING PROBLEM. This needs to be rewritten | 555 | string folder1Name = "a"; |
556 | // userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager, InventoryReceived); | 556 | string folder2Name = "b"; |
557 | // Monitor.Wait(this, 60000); | 557 | string itemName = "c.lsl"; |
558 | // } | 558 | |
559 | // | 559 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random()); |
560 | // //Console.WriteLine("userInfo.RootFolder 1: {0}", userInfo.RootFolder); | 560 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); |
561 | // | 561 | string itemArchiveName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random()); |
562 | // Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); | 562 | |
563 | // List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>(); | 563 | string itemArchivePath |
564 | // | 564 | = string.Format( |
565 | // string folder1Name = "a"; | 565 | "{0}{1}{2}{3}", |
566 | // string folder2Name = "b"; | 566 | ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemArchiveName); |
567 | // string itemName = "c.lsl"; | 567 | |
568 | // | 568 | new InventoryArchiveReadRequest(scene, ua1, null, (Stream)null) |
569 | // string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random()); | 569 | .ReplicateArchivePathToUserInventory( |
570 | // string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); | 570 | itemArchivePath, false, scene.InventoryService.GetRootFolder(ua1.PrincipalID), |
571 | // string itemArchiveName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random()); | 571 | foldersCreated, nodesLoaded); |
572 | // | 572 | |
573 | // string itemArchivePath | 573 | InventoryFolderBase folder1 |
574 | // = string.Format( | 574 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, "a"); |
575 | // "{0}{1}{2}{3}", | 575 | Assert.That(folder1, Is.Not.Null, "Could not find folder a"); |
576 | // ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemArchiveName); | 576 | InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b"); |
577 | // | 577 | Assert.That(folder2, Is.Not.Null, "Could not find folder b"); |
578 | // //Console.WriteLine("userInfo.RootFolder 2: {0}", userInfo.RootFolder); | 578 | } |
579 | // | ||
580 | // new InventoryArchiveReadRequest(scene, userInfo, null, (Stream)null) | ||
581 | // .ReplicateArchivePathToUserInventory( | ||
582 | // itemArchivePath, false, scene.InventoryService.GetRootFolder(userInfo.UserProfile.ID), | ||
583 | // foldersCreated, nodesLoaded); | ||
584 | // | ||
585 | // //Console.WriteLine("userInfo.RootFolder 3: {0}", userInfo.RootFolder); | ||
586 | // //InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a"); | ||
587 | // InventoryFolderBase folder1 | ||
588 | // = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userInfo.UserProfile.ID, "a"); | ||
589 | // Assert.That(folder1, Is.Not.Null, "Could not find folder a"); | ||
590 | // InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b"); | ||
591 | // Assert.That(folder2, Is.Not.Null, "Could not find folder b"); | ||
592 | // } | ||
593 | } | 579 | } |
594 | } | 580 | } \ No newline at end of file |