diff options
Diffstat (limited to 'OpenSim/Tests/Common/Setup/AssetHelpers.cs')
-rw-r--r-- | OpenSim/Tests/Common/Setup/AssetHelpers.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs index 1fc3cb5..6dc993f 100644 --- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs +++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs | |||
@@ -38,12 +38,20 @@ namespace OpenSim.Tests.Common | |||
38 | /// <summary> | 38 | /// <summary> |
39 | /// Create an asset from the given data | 39 | /// Create an asset from the given data |
40 | /// </summary> | 40 | /// </summary> |
41 | public static AssetBase CreateAsset(UUID assetUuid, string data, UUID creatorID) | 41 | public static AssetBase CreateAsset(UUID assetUuid, AssetType assetType, byte[] data, UUID creatorID) |
42 | { | 42 | { |
43 | AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, creatorID.ToString()); | 43 | AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)assetType, creatorID.ToString()); |
44 | asset.Data = Encoding.ASCII.GetBytes(data); | 44 | asset.Data = data; |
45 | return asset; | 45 | return asset; |
46 | } | 46 | } |
47 | |||
48 | /// <summary> | ||
49 | /// Create an asset from the given data | ||
50 | /// </summary> | ||
51 | public static AssetBase CreateAsset(UUID assetUuid, AssetType assetType, string data, UUID creatorID) | ||
52 | { | ||
53 | return CreateAsset(assetUuid, assetType, Encoding.ASCII.GetBytes(data), creatorID); | ||
54 | } | ||
47 | 55 | ||
48 | /// <summary> | 56 | /// <summary> |
49 | /// Create an asset from the given scene object | 57 | /// Create an asset from the given scene object |
@@ -53,9 +61,11 @@ namespace OpenSim.Tests.Common | |||
53 | /// <returns></returns> | 61 | /// <returns></returns> |
54 | public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) | 62 | public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) |
55 | { | 63 | { |
56 | AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, sog.OwnerID.ToString()); | 64 | return CreateAsset( |
57 | asset.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(sog)); | 65 | assetUuid, |
58 | return asset; | 66 | AssetType.Object, |
67 | Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(sog)), | ||
68 | sog.OwnerID); | ||
59 | } | 69 | } |
60 | } | 70 | } |
61 | } | 71 | } |