mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
extend TestGiveInventoryFolder() to check for the receipt by user 2
This commit is contained in:
@@ -26,8 +26,10 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.CoreModules.Avatar.Inventory.Archiver;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
|
||||
@@ -118,5 +120,24 @@ namespace OpenSim.Tests.Common
|
||||
else
|
||||
return newFolder;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the inventory folder that matches the path name. If there are multiple folders then only the first
|
||||
/// is returned.
|
||||
/// </summary>
|
||||
/// <param name="inventoryService"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <returns>null if no folder matching the path was found</returns>
|
||||
public static InventoryFolderBase GetInventoryFolder(IInventoryService inventoryService, UUID userId, string path)
|
||||
{
|
||||
List<InventoryFolderBase> folders
|
||||
= InventoryArchiveUtils.FindFolderByPath(inventoryService, userId, path);
|
||||
|
||||
if (folders.Count != 0)
|
||||
return folders[0];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user