aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Mock/BaseAssetRepository.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/BaseAssetRepository.cs66
1 files changed, 33 insertions, 33 deletions
diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
index acfe4fe..b284abc 100644
--- a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
+++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
@@ -1,34 +1,34 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using OpenMetaverse; 2using OpenMetaverse;
3using OpenSim.Framework; 3using OpenSim.Framework;
4 4
5namespace OpenSim.Tests.Common.Mock 5namespace OpenSim.Tests.Common.Mock
6{ 6{
7 public class BaseAssetRepository 7 public class BaseAssetRepository
8 { 8 {
9 protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>(); 9 protected Dictionary<UUID, AssetBase> Assets = new Dictionary<UUID, AssetBase>();
10 10
11 public AssetBase FetchAsset(UUID uuid) 11 public AssetBase FetchAsset(UUID uuid)
12 { 12 {
13 if (ExistsAsset(uuid)) 13 if (ExistsAsset(uuid))
14 return Assets[uuid]; 14 return Assets[uuid];
15 else 15 else
16 return null; 16 return null;
17 } 17 }
18 18
19 public void CreateAsset(AssetBase asset) 19 public void CreateAsset(AssetBase asset)
20 { 20 {
21 Assets[asset.FullID] = asset; 21 Assets[asset.FullID] = asset;
22 } 22 }
23 23
24 public void UpdateAsset(AssetBase asset) 24 public void UpdateAsset(AssetBase asset)
25 { 25 {
26 CreateAsset(asset); 26 CreateAsset(asset);
27 } 27 }
28 28
29 public bool ExistsAsset(UUID uuid) 29 public bool ExistsAsset(UUID uuid)
30 { 30 {
31 return Assets.ContainsKey(uuid); 31 return Assets.ContainsKey(uuid);
32 } 32 }
33 } 33 }
34} \ No newline at end of file 34} \ No newline at end of file