public void CacheProvider_Fetch_PassEmptyKey_GetEmptyString_AreEqualExpectedValue( TranslationTypeEnum translationType) { //arrange InitTranslationRepo(String.Empty); var cacheProvider = new CacheProvider(_staticTranslationsRepository, _dynamicTranslationsRepository, _mapObjRepositoryTranslations, null); //act string result = cacheProvider.Fetch(translationType, String.Empty); //assert Assert.AreEqual(String.Empty, result); }
public void CacheProvider_Fetch_PassComplexKey_GetResource_AreEqualExpectedValue( TranslationTypeEnum translationType) { //arrange InitTranslationRepo(_expectedValues[0]); var cacheProvider = new CacheProvider(_staticTranslationsRepository, _dynamicTranslationsRepository, _mapObjRepositoryTranslations, null); //act string result = cacheProvider.Fetch(translationType, _complexCacheKey); //assert Assert.AreEqual(_expectedValues[0], result); }
public void CacheProvider_Fetch_PassSingleKey_GetResourceFromCache_AreEqualExpectedValue() { //arrange InitTranslationRepo(_expectedValues[1]); var cacheProvider = new CacheProvider(_staticTranslationsRepository, _dynamicTranslationsRepository, _mapObjRepositoryTranslations, null); //act string result = cacheProvider.Fetch(StaticTranslationType, ButtonCacheKey); //get the value from cache without accessing the DB //assert Assert.AreEqual(_expectedValues[1], result); }