From af8773d6d076f5d74133857a5074bd9e9504dd64 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 4 Jul 2011 23:05:31 +0100 Subject: Add TestClearCache() --- .../CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs index bbe40d1..63b0c31 100644 --- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs +++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs @@ -106,5 +106,22 @@ namespace OpenSim.Region.CoreModules.Asset.Tests AssetBase retrievedAsset = m_cache.Get(asset.ID.ToString()); Assert.That(retrievedAsset, Is.Null); } + + [Test] + public void TestClearCache() + { + TestHelper.InMethod(); +// log4net.Config.XmlConfigurator.Configure(); + + AssetBase asset = AssetHelpers.CreateAsset(); + asset.ID = TestHelper.ParseTail(0x2).ToString(); + + m_cache.Store(asset); + + m_cache.Clear(); + + AssetBase retrievedAsset = m_cache.Get(asset.ID.ToString()); + Assert.That(retrievedAsset, Is.Null); + } } } \ No newline at end of file -- cgit v1.1