ReduceAll() public method

Reduce all known data.
public ReduceAll ( bool deleteReducedData = false ) : string
deleteReducedData bool
return string
Ejemplo n.º 1
0
            public void ShouldNotRunIfWeAreAlreadyReducing()
            {
                var reduceStatus = new Mock<IRecordReduceStatus>();
                reduceStatus.Setup(x => x.IsReducing()).Returns(true).Verifiable();

                var settings = BuildSettings();

                var reducer = new RecordReduce(reduceStatus.Object, null, null, null, null, null, settings.Object);
                reducer.ReduceAll();

                reduceStatus.VerifyAll();
            }
Ejemplo n.º 2
0
            public void ShouldBeAbleToReduce()
            {
                var testData = PopulateTestData(true);

                var reducer = new RecordReduce(testData.ReduceStatus.Object, testData.ReduceAggregater.Object, testData.Cache.Object, testData.ComparisonsData.Object, testData.Storage.Object, testData.DbProviderFactory.Object, testData.Settings.Object);
                reducer.ReduceAll(true);

                Assert.Equal(1, testData.AggregateCount);
                Assert.Equal(1, testData.UpdateIfExistsCount);
                Assert.Equal(2, testData.CalculateCount);
                Assert.Equal(1, testData.DeletedCount);

                testData.Verify();
            }