diff options
author | Melanie | 2010-06-12 00:08:20 +0100 |
---|---|---|
committer | Melanie | 2010-06-12 00:08:20 +0100 |
commit | 836728e5ded245df7553b6a1b6c279d2e11ee370 (patch) | |
tree | d0ff3f9a5cc3747357f36aa09367c5d2eb8a7543 /OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-836728e5ded245df7553b6a1b6c279d2e11ee370.zip opensim-SC-836728e5ded245df7553b6a1b6c279d2e11ee370.tar.gz opensim-SC-836728e5ded245df7553b6a1b6c279d2e11ee370.tar.bz2 opensim-SC-836728e5ded245df7553b6a1b6c279d2e11ee370.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs b/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs index 7e0c567..c57363a 100644 --- a/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
31 | using OpenSim.Region.Framework.Scenes; | ||
31 | using OpenSim.Services.Interfaces; | 32 | using OpenSim.Services.Interfaces; |
32 | 33 | ||
33 | namespace OpenSim.Tests.Common | 34 | namespace OpenSim.Tests.Common |
@@ -39,6 +40,23 @@ namespace OpenSim.Tests.Common | |||
39 | { | 40 | { |
40 | public static readonly string PATH_DELIMITER = "/"; | 41 | public static readonly string PATH_DELIMITER = "/"; |
41 | 42 | ||
43 | public static InventoryItemBase CreateInventoryItem( | ||
44 | Scene scene, string itemName, UUID itemId, string folderPath, UUID userId) | ||
45 | { | ||
46 | InventoryItemBase item = new InventoryItemBase(); | ||
47 | item.Name = itemName; | ||
48 | item.AssetID = AssetHelpers.CreateAsset(scene, userId).FullID; | ||
49 | item.ID = itemId; | ||
50 | |||
51 | // Really quite bad since the objs folder could be moved in the future and confuse the tests | ||
52 | InventoryFolderBase objsFolder = scene.InventoryService.GetFolderForType(userId, AssetType.Object); | ||
53 | |||
54 | item.Folder = objsFolder.ID; | ||
55 | scene.AddInventoryItem(userId, item); | ||
56 | |||
57 | return item; | ||
58 | } | ||
59 | |||
42 | /// <summary> | 60 | /// <summary> |
43 | /// Create inventory folders starting from the user's root folder. | 61 | /// Create inventory folders starting from the user's root folder. |
44 | /// </summary> | 62 | /// </summary> |