encode notecard assets in proper format for tests, rather than just using whatever string is given

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-10-22 00:21:45 +01:00
parent 9b3bbedeea
commit 5d7eaedbeb
1 changed files with 6 additions and 1 deletions

View File

@ -27,6 +27,7 @@
using System.Text; using System.Text;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.Assets;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Serialization; using OpenSim.Region.Framework.Scenes.Serialization;
@ -130,7 +131,11 @@ namespace OpenSim.Tests.Common
/// </summary> /// </summary>
public static AssetBase CreateAsset(UUID assetUuid, AssetType assetType, string data, UUID creatorID) 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);
} }
/// <summary> /// <summary>