aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
diff options
context:
space:
mode:
authorlbsa712009-04-08 19:59:37 +0000
committerlbsa712009-04-08 19:59:37 +0000
commite93b782f9d86e4049a28d7f90c691dc5d242f234 (patch)
tree892fcce074d5e5a817c0b14d2a5e4fefe1b692a9 /OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
parent* Make it possible to store creator strings in user inventory items as well a... (diff)
downloadopensim-SC_OLD-e93b782f9d86e4049a28d7f90c691dc5d242f234.zip
opensim-SC_OLD-e93b782f9d86e4049a28d7f90c691dc5d242f234.tar.gz
opensim-SC_OLD-e93b782f9d86e4049a28d7f90c691dc5d242f234.tar.bz2
opensim-SC_OLD-e93b782f9d86e4049a28d7f90c691dc5d242f234.tar.xz
* Introduced some experimental code with regards to asset data substitution
Diffstat (limited to 'OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs')
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs17
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
index 18ae9a7..70a398e 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
@@ -73,16 +73,27 @@ namespace OpenSim.Framework.Communications.Tests
73 Assert.That( 73 Assert.That(
74 assetData, Is.EqualTo(m_assetReceived.Data), "Asset data stored differs from asset data received"); 74 assetData, Is.EqualTo(m_assetReceived.Data), "Asset data stored differs from asset data received");
75 } 75 }
76 76
77 private void AssetRequestCallback(UUID assetId, AssetBase asset) 77 private void AssetRequestCallback(UUID assetId, AssetBase asset)
78 { 78 {
79 m_assetIdReceived = assetId; 79 m_assetIdReceived = assetId;
80 m_assetReceived = asset; 80 m_assetReceived = asset;
81 81
82 lock (this) 82 lock (this)
83 { 83 {
84 Monitor.PulseAll(this); 84 Monitor.PulseAll(this);
85 } 85 }
86 }
87
88 [Test]
89 public void ProcessAssetDataTest()
90 {
91 string url = "http://host/dir/";
92 string data = " creator_url " + url + " ";
93
94 AssetCache assetCache = new AssetCache();
95
96 Assert.AreEqual(" creator_id "+Util.GetHashGuid( url, AssetCache.AssetInfo.Secret )+" ", assetCache.ProcessAssetDataString( data ));
86 } 97 }
87 } 98 }
88} 99}