redirect UserInventoryHelpers to use a different CreateNotecardAsset() so we can comment out some inconsistency

0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-10-22 00:58:56 +01:00
parent b2ca7c0927
commit a6eba09dac
2 changed files with 19 additions and 12 deletions

View File

@ -56,17 +56,17 @@ namespace OpenSim.Tests.Common
return CreateAsset(id, AssetType.Notecard, "hello", UUID.Random());
}
/// <summary>
/// Create and store a notecard asset with a random uuid and dummy text.
/// </summary>
/// <param name="creatorId">/param>
/// <returns></returns>
public static AssetBase CreateNotecardAsset(Scene scene, UUID creatorId)
{
AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId);
scene.AssetService.Store(asset);
return asset;
}
// /// <summary>
// /// Create and store a notecard asset with a random uuid and dummy text.
// /// </summary>
// /// <param name="creatorId">/param>
// /// <returns></returns>
// public static AssetBase CreateNotecardAsset(Scene scene, UUID creatorId)
// {
// AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId);
// scene.AssetService.Store(asset);
// return asset;
// }
/// <summary>
/// Create an asset from the given object.

View File

@ -86,11 +86,18 @@ namespace OpenSim.Tests.Common
AssetBase asset = null;
if (type == InventoryType.Notecard)
asset = AssetHelpers.CreateNotecardAsset(scene, userId);
{
asset = AssetHelpers.CreateNotecardAsset();
asset.CreatorID = userId.ToString();
}
else if (type == InventoryType.Object)
{
asset = AssetHelpers.CreateAsset(assetId, SceneHelpers.CreateSceneObject(1, userId));
}
else
{
throw new Exception(string.Format("Inventory type {0} not supported", type));
}
scene.AssetService.Store(asset);