public void GetData_FromPrimarySource_ExpectsData(string name) { //Arrange var key = Guid.NewGuid(); var value = new Value() { Name = name }; _primaryReadRepo.Setup(r => r.GetValue(key)).Returns(value); _secondaryReadRepo.Setup(r => r.GetValue(key)).Returns(value); //Act Value result = _cache.GetDataByKey(key); //Assert Assert.AreEqual(name, result.Name); }