public void ShouldSaveValue() { var sourceProvider = new Mock<IRecordReduceStatusSourceProvider>(); sourceProvider.Setup(x => x.WriteValue("0")).Verifiable(); var dataStatus = new RecordReduceStatus(sourceProvider.Object); dataStatus.DoneReducing(); sourceProvider.VerifyAll(); }
public void ShouldReportOnIfOn() { var sourceProvider = new Mock<IRecordReduceStatusSourceProvider>(); sourceProvider.Setup(x => x.ReadValue()).Returns("1").Verifiable(); var dataStatus = new RecordReduceStatus(sourceProvider.Object); var result = dataStatus.IsReducing(); Assert.Equal(true, result); sourceProvider.VerifyAll(); }