aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
diff options
context:
space:
mode:
authorlbsa712009-05-13 17:11:53 +0000
committerlbsa712009-05-13 17:11:53 +0000
commit40e95cab02b125a6c9ec7e90cab94c94b201f021 (patch)
tree6c77dce02a24ee061cf936f95faca13b41759fbe /OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
parentDisabling WebFetchInventoryDescendents CAPs for the time being as it (diff)
downloadopensim-SC-40e95cab02b125a6c9ec7e90cab94c94b201f021.zip
opensim-SC-40e95cab02b125a6c9ec7e90cab94c94b201f021.tar.gz
opensim-SC-40e95cab02b125a6c9ec7e90cab94c94b201f021.tar.bz2
opensim-SC-40e95cab02b125a6c9ec7e90cab94c94b201f021.tar.xz
* Added some more tests to the GetAssetStreamHandlers
Diffstat (limited to '')
-rw-r--r--OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs27
1 files changed, 1 insertions, 26 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index 80b9ae3..b639cc9 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -37,40 +37,15 @@ namespace OpenSim.Tests.Common.Mock
37 /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit 37 /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
38 /// tests are single threaded. 38 /// tests are single threaded.
39 /// </summary> 39 /// </summary>
40 public class TestAssetDataPlugin : IAssetDataPlugin 40 public class TestAssetDataPlugin : BaseAssetRepository, 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>();
46 44
47 public void Initialise() {} 45 public void Initialise() {}
48 public void Initialise(string connect) {} 46 public void Initialise(string connect) {}
49 public void Dispose() {} 47 public void Dispose() {}
50 48
51 public AssetBase FetchAsset(UUID uuid)
52 {
53 if (ExistsAsset(uuid))
54 return Assets[uuid];
55 else
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); } 49 public List<AssetMetadata> FetchAssetMetadataSet(int start, int count) { return new List<AssetMetadata>(count); }
75 } 50 }
76} \ No newline at end of file 51} \ No newline at end of file