aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/MockAssetService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tests/Common/Mock/MockAssetService.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/MockAssetService.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Tests/Common/Mock/MockAssetService.cs b/OpenSim/Tests/Common/Mock/MockAssetService.cs
index 4118308..9d7c5e2 100644
--- a/OpenSim/Tests/Common/Mock/MockAssetService.cs
+++ b/OpenSim/Tests/Common/Mock/MockAssetService.cs
@@ -54,13 +54,19 @@ namespace OpenSim.Tests.Common.Mock
54 54
55 public AssetBase Get(string id) 55 public AssetBase Get(string id)
56 { 56 {
57 m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id); 57// m_log.DebugFormat("[MOCK ASSET SERVICE]: Getting asset with id {0}", id);
58 58
59 AssetBase asset; 59 AssetBase asset;
60 if (Assets.ContainsKey(id)) 60 if (Assets.ContainsKey(id))
61 {
61 asset = Assets[id]; 62 asset = Assets[id];
63// m_log.DebugFormat(
64// "[MOCK ASSET SERVICE]: Got asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
65 }
62 else 66 else
63 asset = null; 67 {
68 asset = null;
69 }
64 70
65 return asset; 71 return asset;
66 } 72 }
@@ -77,7 +83,14 @@ namespace OpenSim.Tests.Common.Mock
77 83
78 public byte[] GetData(string id) 84 public byte[] GetData(string id)
79 { 85 {
80 throw new System.NotImplementedException(); 86// m_log.DebugFormat("[MOCK ASSET SERVICE]: Requesting data for asset {0}", id);
87
88 AssetBase asset = Get(id);
89
90 if (asset == null)
91 return null;
92 else
93 return asset.Data;
81 } 94 }
82 95
83 public bool Get(string id, object sender, AssetRetrieved handler) 96 public bool Get(string id, object sender, AssetRetrieved handler)
@@ -89,7 +102,8 @@ namespace OpenSim.Tests.Common.Mock
89 102
90 public string Store(AssetBase asset) 103 public string Store(AssetBase asset)
91 { 104 {
92 m_log.DebugFormat("[MOCK ASSET SERVICE]: Storing asset {0}", asset.ID); 105// m_log.DebugFormat(
106// "[MOCK ASSET SERVICE]: Storing asset {0} {1}, bytes {2}", asset.Name, asset.ID, asset.Data.Length);
93 107
94 Assets[asset.ID] = asset; 108 Assets[asset.ID] = asset;
95 109