public void ClearCache_HandlesNoCodeTableCache() { Mock<IJustWareApi> api = new Mock<IJustWareApi>(); Mock<ICodeTableCache> cache = new Mock<ICodeTableCache>(); CodeLookupHelper helper = new CodeLookupHelper(api.Object); helper.ClearCache<CaseType>(); //As long as we didn't crash because we have no cache, everything is happy. }
public void ClearCache_HandlesNoCodeTableCache() { Mock <IJustWareApi> api = new Mock <IJustWareApi>(); Mock <ICodeTableCache> cache = new Mock <ICodeTableCache>(); CodeLookupHelper helper = new CodeLookupHelper(api.Object); helper.ClearCache <CaseType>(); //As long as we didn't crash because we have no cache, everything is happy. }
public void ClearCache_CallsClearCacheOnCodeTableCache() { Mock<IJustWareApi> api = new Mock<IJustWareApi>(); Mock<ICodeTableCache> cache = new Mock<ICodeTableCache>(); CodeLookupHelper helper = new CodeLookupHelper(api.Object, cache.Object); helper.ClearCache<CaseType>(); cache.Verify(c => c.ClearCache<CaseType>(), Times.Once(), "ClearCache was not called on the CodeTableCache"); }
public void ClearCache_CallsClearCacheOnCodeTableCache() { Mock <IJustWareApi> api = new Mock <IJustWareApi>(); Mock <ICodeTableCache> cache = new Mock <ICodeTableCache>(); CodeLookupHelper helper = new CodeLookupHelper(api.Object, cache.Object); helper.ClearCache <CaseType>(); cache.Verify(c => c.ClearCache <CaseType>(), Times.Once(), "ClearCache was not called on the CodeTableCache"); }