public void TryGetResult_Should_Get_Value_If_Reinstantiated() { var contact = new Contact() { ContactId = 1, Name = "Test User" }; CachingStrategy.SaveGetResult(1, contact); var cacheProvider = new InMemoryCachingProvider(Cache); var localCachingStrategy = new StandardCachingStrategyWithPartition <Contact, int, int>(cacheProvider, c => c.ContactTypeId) { CachePrefix = "#RepoStandardCacheWithPartition" }; localCachingStrategy.TryGetResult(1, out Contact result).ShouldBe(true); result.ContactId.ShouldBe(contact.ContactId); result.Name.ShouldBe(contact.Name); }