aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-06-04 00:20:54 +0100
committerJustin Clark-Casey (justincc)2011-06-04 00:20:54 +0100
commit1543fd7fff3b3f3a7ce07caa3ed19846b6587df7 (patch)
treed878258728d4f92b48c9e7af8827185ab120491f /OpenSim
parentIf an llSensor() is in an attachment, make the detection cone face in the dir... (diff)
downloadopensim-SC-1543fd7fff3b3f3a7ce07caa3ed19846b6587df7.zip
opensim-SC-1543fd7fff3b3f3a7ce07caa3ed19846b6587df7.tar.gz
opensim-SC-1543fd7fff3b3f3a7ce07caa3ed19846b6587df7.tar.bz2
opensim-SC-1543fd7fff3b3f3a7ce07caa3ed19846b6587df7.tar.xz
extend TestGiveInventoryFolder() to check for the receipt by user 2
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs6
-rw-r--r--OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs21
2 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
index 651df3e..c6bd296 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
@@ -66,8 +66,10 @@ namespace OpenSim.Region.Framework.Tests
66 66
67 scene.GiveInventoryFolder(user2.PrincipalID, user1.PrincipalID, folder1.ID, UUID.Zero); 67 scene.GiveInventoryFolder(user2.PrincipalID, user1.PrincipalID, folder1.ID, UUID.Zero);
68 68
69// InventoryFolderBase receivedFolder1Template = new InventoryFolderBase( 69 InventoryFolderBase retrievedFolder1
70// InventoryFolderBase receivedFolder1 = scene.InventoryService.GetFolder 70 = UserInventoryHelpers.GetInventoryFolder(scene.InventoryService, user2.PrincipalID, "folder1");
71
72 Assert.That(retrievedFolder1, Is.Not.Null);
71 } 73 }
72 } 74 }
73} \ No newline at end of file 75} \ No newline at end of file
diff --git a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs
index e33145f..03215f2 100644
--- a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs
@@ -26,8 +26,10 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
29using OpenMetaverse; 30using OpenMetaverse;
30using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
31using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
32using OpenSim.Services.Interfaces; 34using OpenSim.Services.Interfaces;
33 35
@@ -118,5 +120,24 @@ namespace OpenSim.Tests.Common
118 else 120 else
119 return newFolder; 121 return newFolder;
120 } 122 }
123
124 /// <summary>
125 /// Get the inventory folder that matches the path name. If there are multiple folders then only the first
126 /// is returned.
127 /// </summary>
128 /// <param name="inventoryService"></param>
129 /// <param name="userId"></param>
130 /// <param name="path"></param>
131 /// <returns>null if no folder matching the path was found</returns>
132 public static InventoryFolderBase GetInventoryFolder(IInventoryService inventoryService, UUID userId, string path)
133 {
134 List<InventoryFolderBase> folders
135 = InventoryArchiveUtils.FindFolderByPath(inventoryService, userId, path);
136
137 if (folders.Count != 0)
138 return folders[0];
139 else
140 return null;
141 }
121 } 142 }
122} \ No newline at end of file 143} \ No newline at end of file