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

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-10-22 00:58:56 +01:00
parent bc2da4eaad
commit 30320505fa
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);