Merge branch 'master' of ssh://MyConnection/var/git/opensim
commit
8727e773d4
|
@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
/// <summary>
|
||||
/// Test saving a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet).
|
||||
/// </summary>
|
||||
//[Test]
|
||||
[Test]
|
||||
public void TestSaveIarV0_1()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
|
@ -82,7 +82,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
|
||||
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene("");
|
||||
Scene scene = SceneSetupHelpers.SetupScene("Inventory");
|
||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule);
|
||||
CommunicationsManager cm = scene.CommsManager;
|
||||
|
||||
|
@ -222,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
/// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
|
||||
/// an account exists with the creator name.
|
||||
/// </summary>
|
||||
//[Test]
|
||||
[Test]
|
||||
public void TestLoadIarV0_1ExistingUsers()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
|
@ -262,7 +262,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
InventoryArchiverModule archiverModule = new InventoryArchiverModule();
|
||||
|
||||
// Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
Scene scene = SceneSetupHelpers.SetupScene("inventory");
|
||||
IUserAdminService userAdminService = scene.CommsManager.UserAdminService;
|
||||
|
||||
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
|
||||
|
@ -276,16 +276,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
|
|||
|
||||
CachedUserInfo userInfo
|
||||
= scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
|
||||
//userInfo.FetchInventory();
|
||||
/*
|
||||
for (int i = 0 ; i < 50 ; i++)
|
||||
{
|
||||
if (userInfo.HasReceivedInventory == true)
|
||||
break;
|
||||
Thread.Sleep(200);
|
||||
}
|
||||
Assert.That(userInfo.HasReceivedInventory, Is.True, "FetchInventory timed out (10 seconds)");
|
||||
*/
|
||||
|
||||
InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
|
||||
Assert.That(foundItem, Is.Not.Null, "Didn't find loaded item");
|
||||
Assert.That(
|
||||
|
|
|
@ -34,25 +34,53 @@ namespace OpenSim.Services.Interfaces
|
|||
|
||||
public interface IAssetService
|
||||
{
|
||||
// Three different ways to retrieve an asset
|
||||
//
|
||||
/// <summary>
|
||||
/// Get an asset synchronously.
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
AssetBase Get(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Get an asset's metadata
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
AssetMetadata GetMetadata(string id);
|
||||
|
||||
byte[] GetData(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Get an asset asynchronously
|
||||
/// </summary>
|
||||
/// <param name="id">The asset id</param>
|
||||
/// <param name="sender">Represents the requester. Passed back via the handler</param>
|
||||
/// <param name="handler">The handler to call back once the asset has been retrieved</param>
|
||||
/// <returns>True if the id was parseable, false otherwise</returns>
|
||||
bool Get(string id, Object sender, AssetRetrieved handler);
|
||||
|
||||
// Creates a new asset
|
||||
// Returns a random ID if none is passed into it
|
||||
//
|
||||
/// <summary>
|
||||
/// Creates a new asset
|
||||
/// </summary>
|
||||
/// Returns a random ID if none is passed into it
|
||||
/// <param name="asset"></param>
|
||||
/// <returns></returns>
|
||||
string Store(AssetBase asset);
|
||||
|
||||
// Attachments and bare scripts need this!!
|
||||
//
|
||||
/// <summary>
|
||||
/// Update an asset's content
|
||||
/// </summary>
|
||||
/// Attachments and bare scripts need this!!
|
||||
/// <param name="id"> </param>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
bool UpdateContent(string id, byte[] data);
|
||||
|
||||
// Kill an asset
|
||||
//
|
||||
/// <summary>
|
||||
/// Delete an asset
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
bool Delete(string id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,13 @@ namespace OpenSim.Tests.Common.Mock
|
|||
|
||||
public AssetBase Get(string id)
|
||||
{
|
||||
return Assets[ id ];
|
||||
AssetBase asset;
|
||||
if (Assets.ContainsKey(id))
|
||||
asset = Assets[id];
|
||||
else
|
||||
asset = null;
|
||||
|
||||
return asset;
|
||||
}
|
||||
|
||||
public AssetMetadata GetMetadata(string id)
|
||||
|
@ -59,8 +65,10 @@ namespace OpenSim.Tests.Common.Mock
|
|||
}
|
||||
|
||||
public bool Get(string id, object sender, AssetRetrieved handler)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
{
|
||||
handler(id, sender, Get(id));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public string Store(AssetBase asset)
|
||||
|
|
Loading…
Reference in New Issue