minor: refactor CreateAsset to eliminate dupe code

soprefactor
Justin Clark-Casey (justincc) 2010-05-21 19:41:00 +01:00
parent 74ef1ed36f
commit 682efe9463
1 changed files with 5 additions and 3 deletions

View File

@ -61,9 +61,11 @@ namespace OpenSim.Tests.Common
/// <returns></returns> /// <returns></returns>
public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog)
{ {
AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, sog.OwnerID.ToString()); return CreateAsset(
asset.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(sog)); assetUuid,
return asset; AssetType.Object,
Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(sog)),
sog.OwnerID);
} }
} }
} }