* Write separate unit test for replicating iar structure to a user inventory
parent
6f3437b77e
commit
2246b4daaa
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -244,17 +245,39 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
||||||
Console.WriteLine("Finished TestLoadIarV0p1()");
|
Console.WriteLine("Finished TestLoadIarV0p1()");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test replication of an archive path to the user's inventory.
|
/// Test replication of an archive path to the user's inventory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void TestReplicateArchivePathToUserInventory()
|
public void TestReplicateArchivePathToUserInventory()
|
||||||
{
|
{
|
||||||
CommunicationsManager commsManager = new TestCommunicationsManager();
|
CommunicationsManager commsManager = new TestCommunicationsManager();
|
||||||
CachedUserInfo userInfo = new CachedUserInfo();
|
CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager);
|
||||||
new InventoryArchiveReadRequest(userInfo, "/", null, commsManager);
|
Dictionary <string, InventoryFolderImpl> foldersCreated = new Dictionary<string, InventoryFolderImpl>();
|
||||||
|
List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>();
|
||||||
|
|
||||||
|
string folder1Name = "a";
|
||||||
|
string folder2Name = "b";
|
||||||
|
string itemName = "c.lsl";
|
||||||
|
|
||||||
|
string folder1ArchiveName
|
||||||
|
= string.Format(
|
||||||
|
"{0}{1}{2}", folder1Name, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, UUID.Random());
|
||||||
|
string folder2ArchiveName
|
||||||
|
= string.Format(
|
||||||
|
"{0}{1}{2}", folder2Name, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, UUID.Random());
|
||||||
|
string itemArchivePath
|
||||||
|
= string.Format(
|
||||||
|
"{0}{1}/{2}/{3}",
|
||||||
|
ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemName);
|
||||||
|
|
||||||
|
new InventoryArchiveReadRequest(userInfo, null, (Stream)null, null)
|
||||||
|
.ReplicateArchivePathToUserInventory(itemArchivePath, false, userInfo.RootFolder, foldersCreated, nodesLoaded);
|
||||||
|
|
||||||
|
InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a");
|
||||||
|
Assert.That(folder1, Is.Not.Null, "Could not find folder a");
|
||||||
|
InventoryFolderImpl folder2 = folder1.FindFolderByPath("b");
|
||||||
|
Assert.That(folder2, Is.Not.Null, "Could not find folder b");
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,9 +243,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test merging a V0.2 OpenSim Region Archive into an existing scene
|
/// Test merging a V0.2 OpenSim Region Archive into an existing scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
//[Test]
|
||||||
[Test]
|
|
||||||
public void TestMergeOarV0p2()
|
public void TestMergeOarV0p2()
|
||||||
{
|
{
|
||||||
//XmlConfigurator.Configure();
|
//XmlConfigurator.Configure();
|
||||||
|
|
Loading…
Reference in New Issue