aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/BaseAssetRepository.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/BaseAssetRepository.cs
parentDisabling WebFetchInventoryDescendents CAPs for the time being as it (diff)
downloadopensim-SC_OLD-40e95cab02b125a6c9ec7e90cab94c94b201f021.zip
opensim-SC_OLD-40e95cab02b125a6c9ec7e90cab94c94b201f021.tar.gz
opensim-SC_OLD-40e95cab02b125a6c9ec7e90cab94c94b201f021.tar.bz2
opensim-SC_OLD-40e95cab02b125a6c9ec7e90cab94c94b201f021.tar.xz
* Added some more tests to the GetAssetStreamHandlers
Diffstat (limited to 'OpenSim/Tests/Common/Mock/BaseAssetRepository.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/BaseAssetRepository.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
new file mode 100644
index 0000000..acfe4fe
--- /dev/null
+++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
@@ -0,0 +1,34 @@
1using System.Collections.Generic;
2using OpenMetaverse;
3using OpenSim.Framework;
4
5namespace OpenSim.Tests.Common.Mock
6{
7 public class BaseAssetRepository
8 {
9 protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>();
10
11 public AssetBase FetchAsset(UUID uuid)
12 {
13 if (ExistsAsset(uuid))
14 return Assets[uuid];
15 else
16 return null;
17 }
18
19 public void CreateAsset(AssetBase asset)
20 {
21 Assets[asset.FullID] = asset;
22 }
23
24 public void UpdateAsset(AssetBase asset)
25 {
26 CreateAsset(asset);
27 }
28
29 public bool ExistsAsset(UUID uuid)
30 {
31 return Assets.ContainsKey(uuid);
32 }
33 }
34} \ No newline at end of file