aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-24 19:43:54 +0000
committerJustin Clarke Casey2009-04-24 19:43:54 +0000
commit2246b4daaafc15290e1e90011d41ecb77b5be74e (patch)
treeb731b8bfc26854a790db0131708da1fba0d07374
parentsome code cleanup (diff)
downloadopensim-SC-2246b4daaafc15290e1e90011d41ecb77b5be74e.zip
opensim-SC-2246b4daaafc15290e1e90011d41ecb77b5be74e.tar.gz
opensim-SC-2246b4daaafc15290e1e90011d41ecb77b5be74e.tar.bz2
opensim-SC-2246b4daaafc15290e1e90011d41ecb77b5be74e.tar.xz
* Write separate unit test for replicating iar structure to a user inventory
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs33
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs5
2 files changed, 30 insertions, 8 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
28using System; 28using System;
29using System.Collections.Generic;
29using System.IO; 30using System.IO;
30using System.Text; 31using System.Text;
31using System.Threading; 32using 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}
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index e75ca20..70ed6a7 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -243,9 +243,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
243 243
244 /// <summary> 244 /// <summary>
245 /// Test merging a V0.2 OpenSim Region Archive into an existing scene 245 /// Test merging a V0.2 OpenSim Region Archive into an existing scene
246 /// </summary> 246 /// </summary>
247 247 //[Test]
248 [Test]
249 public void TestMergeOarV0p2() 248 public void TestMergeOarV0p2()
250 { 249 {
251 //XmlConfigurator.Configure(); 250 //XmlConfigurator.Configure();