From 5d7eaedbebd408d948321dc474927fc72d3d98c5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 22 Oct 2011 00:21:45 +0100 Subject: encode notecard assets in proper format for tests, rather than just using whatever string is given --- OpenSim/Tests/Common/Helpers/AssetHelpers.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Helpers/AssetHelpers.cs b/OpenSim/Tests/Common/Helpers/AssetHelpers.cs index 4839bcb..aecd77e 100644 --- a/OpenSim/Tests/Common/Helpers/AssetHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/AssetHelpers.cs @@ -27,6 +27,7 @@ using System.Text; using OpenMetaverse; +using OpenMetaverse.Assets; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; @@ -130,7 +131,11 @@ namespace OpenSim.Tests.Common /// public static AssetBase CreateAsset(UUID assetUuid, AssetType assetType, string data, UUID creatorID) { - return CreateAsset(assetUuid, assetType, Encoding.ASCII.GetBytes(data), creatorID); + AssetNotecard anc = new AssetNotecard(); + anc.BodyText = "data"; + anc.Encode(); + + return CreateAsset(assetUuid, assetType, anc.AssetData, creatorID); } /// -- cgit v1.1