public void Failure_Integer_ShouldReturnSuccessFalseWithContentAsDefaultInt() { var result = CacheResult <int> .Failure(); result.Success.ShouldBeFalse(); result.Content.ShouldBe(default(int)); }
private static CacheResult <TResult> CreateCacheResult <TResult>(string entry) { if (entry == null) { return(CacheResult <TResult> .Failure()); } return(new CacheResult <TResult> { Success = true, Content = JsonConvert.DeserializeObject <TResult>(entry) }); }