From 74ef1ed36f234d93aa3d58b1602344bcb3e00d6e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 21 May 2010 19:36:39 +0100
Subject: add prim item and test asset save in save oar unit test
---
OpenSim/Tests/Common/Setup/AssetHelpers.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Tests')
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
index 1fc3cb5..1beafcf 100644
--- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
@@ -38,12 +38,20 @@ namespace OpenSim.Tests.Common
///
/// Create an asset from the given data
///
- 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;
}
+
+ ///
+ /// Create an asset from the given data
+ ///
+ public static AssetBase CreateAsset(UUID assetUuid, AssetType assetType, string data, UUID creatorID)
+ {
+ return CreateAsset(assetUuid, assetType, Encoding.ASCII.GetBytes(data), creatorID);
+ }
///
/// Create an asset from the given scene object
--
cgit v1.1