mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
add prim item and test asset save in save oar unit test
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user