diff options
author | Justin Clark-Casey (justincc) | 2011-06-04 00:51:49 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-06-04 00:51:49 +0100 |
commit | 896f039513398a46458b18ef49f52a9a3ac43659 (patch) | |
tree | feabf11001d4ec6499718ca6bad9183e6eb347e0 /OpenSim/Tests/Common/Helpers | |
parent | extend TestGiveInventoryFolder() to check for the receipt by user 2 (diff) | |
download | opensim-SC_OLD-896f039513398a46458b18ef49f52a9a3ac43659.zip opensim-SC_OLD-896f039513398a46458b18ef49f52a9a3ac43659.tar.gz opensim-SC_OLD-896f039513398a46458b18ef49f52a9a3ac43659.tar.bz2 opensim-SC_OLD-896f039513398a46458b18ef49f52a9a3ac43659.tar.xz |
create TestGetInventoryItem()
Diffstat (limited to 'OpenSim/Tests/Common/Helpers')
-rw-r--r-- | OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs index 03215f2..93b655a 100644 --- a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs | |||
@@ -43,7 +43,20 @@ namespace OpenSim.Tests.Common | |||
43 | public static readonly string PATH_DELIMITER = "/"; | 43 | public static readonly string PATH_DELIMITER = "/"; |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Creates a notecard in the objects folder. | 46 | /// Creates a notecard in the objects folder and specify an item id. |
47 | /// </summary> | ||
48 | /// <param name="scene"></param> | ||
49 | /// <param name="itemName"></param> | ||
50 | /// <param name="itemId"></param> | ||
51 | /// <param name="userId"></param> | ||
52 | /// <returns></returns> | ||
53 | public static InventoryItemBase CreateInventoryItem(Scene scene, string itemName, UUID userId) | ||
54 | { | ||
55 | return CreateInventoryItem(scene, itemName, UUID.Random(), userId); | ||
56 | } | ||
57 | |||
58 | /// <summary> | ||
59 | /// Creates a notecard in the objects folder and specify an item id. | ||
47 | /// </summary> | 60 | /// </summary> |
48 | /// <param name="scene"></param> | 61 | /// <param name="scene"></param> |
49 | /// <param name="itemName"></param> | 62 | /// <param name="itemName"></param> |
@@ -139,5 +152,18 @@ namespace OpenSim.Tests.Common | |||
139 | else | 152 | else |
140 | return null; | 153 | return null; |
141 | } | 154 | } |
155 | |||
156 | /// <summary> | ||
157 | /// Get the inventory item that matches the path name. If there are multiple items then only the first | ||
158 | /// is returned. | ||
159 | /// </summary> | ||
160 | /// <param name="inventoryService"></param> | ||
161 | /// <param name="userId"></param> | ||
162 | /// <param name="path"></param> | ||
163 | /// <returns>null if no item matching the path was found</returns> | ||
164 | public static InventoryItemBase GetInventoryItem(IInventoryService inventoryService, UUID userId, string path) | ||
165 | { | ||
166 | return InventoryArchiveUtils.FindItemByPath(inventoryService, userId, path); | ||
167 | } | ||
142 | } | 168 | } |
143 | } \ No newline at end of file | 169 | } \ No newline at end of file |