diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 1d4256b..302d214 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.IO; | 30 | using System.IO; |
30 | using System.Text; | 31 | using System.Text; |
31 | using System.Threading; | 32 | using System.Threading; |
@@ -244,17 +245,39 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
244 | Console.WriteLine("Finished TestLoadIarV0p1()"); | 245 | Console.WriteLine("Finished TestLoadIarV0p1()"); |
245 | } | 246 | } |
246 | 247 | ||
247 | /* | ||
248 | /// <summary> | 248 | /// <summary> |
249 | /// Test replication of an archive path to the user's inventory. | 249 | /// Test replication of an archive path to the user's inventory. |
250 | /// </summary> | 250 | /// </summary> |
251 | [Test] | 251 | [Test] |
252 | public void TestReplicateArchivePathToUserInventory() | 252 | public void TestReplicateArchivePathToUserInventory() |
253 | { | 253 | { |
254 | CommunicationsManager commsManager = new TestCommunicationsManager(); | 254 | CommunicationsManager commsManager = new TestCommunicationsManager(); |
255 | CachedUserInfo userInfo = new CachedUserInfo(); | 255 | CachedUserInfo userInfo = UserProfileTestUtils.CreateUserWithInventory(commsManager); |
256 | new InventoryArchiveReadRequest(userInfo, "/", null, commsManager); | 256 | Dictionary <string, InventoryFolderImpl> foldersCreated = new Dictionary<string, InventoryFolderImpl>(); |
257 | List<InventoryNodeBase> nodesLoaded = new List<InventoryNodeBase>(); | ||
258 | |||
259 | string folder1Name = "a"; | ||
260 | string folder2Name = "b"; | ||
261 | string itemName = "c.lsl"; | ||
262 | |||
263 | string folder1ArchiveName | ||
264 | = string.Format( | ||
265 | "{0}{1}{2}", folder1Name, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, UUID.Random()); | ||
266 | string folder2ArchiveName | ||
267 | = string.Format( | ||
268 | "{0}{1}{2}", folder2Name, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, UUID.Random()); | ||
269 | string itemArchivePath | ||
270 | = string.Format( | ||
271 | "{0}{1}/{2}/{3}", | ||
272 | ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemName); | ||
273 | |||
274 | new InventoryArchiveReadRequest(userInfo, null, (Stream)null, null) | ||
275 | .ReplicateArchivePathToUserInventory(itemArchivePath, false, userInfo.RootFolder, foldersCreated, nodesLoaded); | ||
276 | |||
277 | InventoryFolderImpl folder1 = userInfo.RootFolder.FindFolderByPath("a"); | ||
278 | Assert.That(folder1, Is.Not.Null, "Could not find folder a"); | ||
279 | InventoryFolderImpl folder2 = folder1.FindFolderByPath("b"); | ||
280 | Assert.That(folder2, Is.Not.Null, "Could not find folder b"); | ||
257 | } | 281 | } |
258 | */ | ||
259 | } | 282 | } |
260 | } | 283 | } |