public void TestGetCache() { Assert.IsTrue(_databaseServiceImpl.GetDataCache("name1", null) is DataCacheNullImpl); DataCacheLRUImpl lru = (DataCacheLRUImpl)_databaseServiceImpl.GetDataCache("name2", null); Assert.AreEqual(10000, lru.CacheSize); DataCacheExpiringImpl exp = (DataCacheExpiringImpl)_databaseServiceImpl.GetDataCache("name3", null); Assert.AreEqual(1000, exp.MaxAgeMSec); Assert.AreEqual(3000, exp.PurgeIntervalMSec); }
public void TestGetCache() { var dataCacheFactory = new DataCacheFactory(); Assert.That(_databaseServiceImpl.GetDataCache("name1", null, null, dataCacheFactory, 0), Is.InstanceOf <DataCacheNullImpl>()); var lru = (DataCacheLRUImpl)_databaseServiceImpl.GetDataCache("name2", null, null, dataCacheFactory, 0); Assert.AreEqual(10000, lru.CacheSize); var exp = (DataCacheExpiringImpl)_databaseServiceImpl.GetDataCache("name3", null, null, dataCacheFactory, 0); Assert.AreEqual(1000, exp.MaxAgeMSec); Assert.AreEqual(3000, exp.PurgeIntervalMSec); }
public void TestGetCache() { var statementContext = SupportStatementContextFactory.MakeContext(); var dataCacheFactory = new DataCacheFactory(); Assert.That(_databaseServiceImpl.GetDataCache("name1", null, null, dataCacheFactory, 0), Is.InstanceOf <DataCacheNullImpl>()); var lru = (DataCacheLRUImpl)_databaseServiceImpl.GetDataCache("name2", statementContext, null, dataCacheFactory, 0); Assert.AreEqual(10000, lru.CacheSize); var exp = (DataCacheExpiringImpl)_databaseServiceImpl.GetDataCache("name3", statementContext, null, dataCacheFactory, 0); Assert.AreEqual(1.0d, exp.MaxAgeSec); Assert.AreEqual(3.0d, exp.PurgeIntervalSec); }