Exemplo n.º 1
0
            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();
            }
Exemplo n.º 2
0
            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();
            }