aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs')
-rw-r--r--OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
index 36cffd0..bbe40d1 100644
--- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
+++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
@@ -44,6 +44,9 @@ using OpenSim.Tests.Common.Mock;
44 44
45namespace OpenSim.Region.CoreModules.Asset.Tests 45namespace OpenSim.Region.CoreModules.Asset.Tests
46{ 46{
47 /// <summary>
48 /// At the moment we're only test the in-memory part of the FlotsamAssetCache. This is a considerable weakness.
49 /// </summary>
47 [TestFixture] 50 [TestFixture]
48 public class FlotsamAssetCacheTests 51 public class FlotsamAssetCacheTests
49 { 52 {
@@ -86,5 +89,22 @@ namespace OpenSim.Region.CoreModules.Asset.Tests
86 Assert.That(retrievedAsset, Is.Not.Null); 89 Assert.That(retrievedAsset, Is.Not.Null);
87 Assert.That(retrievedAsset.ID, Is.EqualTo(asset.ID)); 90 Assert.That(retrievedAsset.ID, Is.EqualTo(asset.ID));
88 } 91 }
92
93 [Test]
94 public void TestExpireAsset()
95 {
96 TestHelper.InMethod();
97// log4net.Config.XmlConfigurator.Configure();
98
99 AssetBase asset = AssetHelpers.CreateAsset();
100 asset.ID = TestHelper.ParseTail(0x2).ToString();
101
102 m_cache.Store(asset);
103
104 m_cache.Expire(asset.ID);
105
106 AssetBase retrievedAsset = m_cache.Get(asset.ID.ToString());
107 Assert.That(retrievedAsset, Is.Null);
108 }
89 } 109 }
90} \ No newline at end of file 110} \ No newline at end of file