diff options
author | Justin Clark-Casey (justincc) | 2010-05-21 19:41:00 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-05-21 19:41:00 +0100 |
commit | 682efe94635943fbfadc19204d77602fd30b3861 (patch) | |
tree | b8aeee6abd0ae8b95c9841fde677d1c1d1621db3 /OpenSim/Tests/Common/Setup | |
parent | add prim item and test asset save in save oar unit test (diff) | |
download | opensim-SC_OLD-682efe94635943fbfadc19204d77602fd30b3861.zip opensim-SC_OLD-682efe94635943fbfadc19204d77602fd30b3861.tar.gz opensim-SC_OLD-682efe94635943fbfadc19204d77602fd30b3861.tar.bz2 opensim-SC_OLD-682efe94635943fbfadc19204d77602fd30b3861.tar.xz |
minor: refactor CreateAsset to eliminate dupe code
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Common/Setup/AssetHelpers.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs index 1beafcf..6dc993f 100644 --- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs +++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs | |||
@@ -61,9 +61,11 @@ namespace OpenSim.Tests.Common | |||
61 | /// <returns></returns> | 61 | /// <returns></returns> |
62 | public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) | 62 | public static AssetBase CreateAsset(UUID assetUuid, SceneObjectGroup sog) |
63 | { | 63 | { |
64 | AssetBase asset = new AssetBase(assetUuid, assetUuid.ToString(), (sbyte)AssetType.Object, sog.OwnerID.ToString()); | 64 | return CreateAsset( |
65 | asset.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(sog)); | 65 | assetUuid, |
66 | return asset; | 66 | AssetType.Object, |
67 | Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(sog)), | ||
68 | sog.OwnerID); | ||
67 | } | 69 | } |
68 | } | 70 | } |
69 | } | 71 | } |