diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs index d6bce5b..80b9ae3 100644 --- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | |||
@@ -38,18 +38,39 @@ namespace OpenSim.Tests.Common.Mock | |||
38 | /// tests are single threaded. | 38 | /// tests are single threaded. |
39 | /// </summary> | 39 | /// </summary> |
40 | public class TestAssetDataPlugin : IAssetDataPlugin | 40 | public class TestAssetDataPlugin : IAssetDataPlugin |
41 | { | 41 | { |
42 | public string Version { get { return "0"; } } | 42 | public string Version { get { return "0"; } } |
43 | public string Name { get { return "TestAssetDataPlugin"; } } | 43 | public string Name { get { return "TestAssetDataPlugin"; } } |
44 | |||
45 | protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>(); | ||
44 | 46 | ||
45 | public void Initialise() {} | 47 | public void Initialise() {} |
48 | public void Initialise(string connect) {} | ||
46 | public void Dispose() {} | 49 | public void Dispose() {} |
47 | 50 | ||
48 | public AssetBase FetchAsset(UUID uuid) { return null; } | 51 | public AssetBase FetchAsset(UUID uuid) |
49 | public void CreateAsset(AssetBase asset) {} | 52 | { |
50 | public void UpdateAsset(AssetBase asset) {} | 53 | if (ExistsAsset(uuid)) |
51 | public bool ExistsAsset(UUID uuid) { return false; } | 54 | return Assets[uuid]; |
52 | public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); } | 55 | else |
53 | public void Initialise(string connect) {} | 56 | return null; |
57 | } | ||
58 | |||
59 | public void CreateAsset(AssetBase asset) | ||
60 | { | ||
61 | Assets[asset.FullID] = asset; | ||
62 | } | ||
63 | |||
64 | public void UpdateAsset(AssetBase asset) | ||
65 | { | ||
66 | CreateAsset(asset); | ||
67 | } | ||
68 | |||
69 | public bool ExistsAsset(UUID uuid) | ||
70 | { | ||
71 | return Assets.ContainsKey(uuid); | ||
72 | } | ||
73 | |||
74 | public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); } | ||
54 | } | 75 | } |
55 | } | 76 | } \ No newline at end of file |