add prim item and test asset save in save oar unit test

This commit is contained in:
Justin Clark-Casey (justincc)
2010-05-21 19:36:39 +01:00
parent 78a0fd5281
commit 74ef1ed36f
6 changed files with 55 additions and 11 deletions

View File

@@ -38,12 +38,20 @@ namespace OpenSim.Tests.Common
/// <summary>
/// Create an asset from the given data
/// </summary>
public static AssetBase CreateAsset(UUID assetUuid, string data, UUID creatorID)
public static AssetBase CreateAsset(UUID assetUuid, AssetType assetType, byte[] data, UUID creatorID)
{
AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, creatorID.ToString());
asset.Data = Encoding.ASCII.GetBytes(data);
AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)assetType, creatorID.ToString());
asset.Data = data;
return asset;
}
/// <summary>
/// Create an asset from the given data
/// </summary>
public static AssetBase CreateAsset(UUID assetUuid, AssetType assetType, string data, UUID creatorID)
{
return CreateAsset(assetUuid, assetType, Encoding.ASCII.GetBytes(data), creatorID);
}
/// <summary>
/// Create an asset from the given scene object