diff options
author | Justin Clark-Casey (justincc) | 2011-07-04 23:03:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-04 23:03:05 +0100 |
commit | cb02fc44f5f80fce8fe9e1b87bcfa09df7960a13 (patch) | |
tree | cc5807ef1f3dec9ee900af60cd31dbddd9c3a8ae /OpenSim | |
parent | refactor: Move test setup code into setup method (diff) | |
download | opensim-SC_OLD-cb02fc44f5f80fce8fe9e1b87bcfa09df7960a13.zip opensim-SC_OLD-cb02fc44f5f80fce8fe9e1b87bcfa09df7960a13.tar.gz opensim-SC_OLD-cb02fc44f5f80fce8fe9e1b87bcfa09df7960a13.tar.bz2 opensim-SC_OLD-cb02fc44f5f80fce8fe9e1b87bcfa09df7960a13.tar.xz |
add TestExpireAsset()
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs | 20 |
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 | ||
45 | namespace OpenSim.Region.CoreModules.Asset.Tests | 45 | namespace 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 |