Reduce() public method

Calculate and store all reductions for the given configuration.
public Reduce ( string configName, bool deleteReducedData = false, IDbConnection conn = null, bool isInner = false ) : string
configName string
deleteReducedData bool If true, will actually delete the reduced data
conn IDbConnection
isInner bool
return string
コード例 #1
0
ファイル: TestForRecordReduce.cs プロジェクト: Zocdoc/ZocMon
            public void ShouldBeAbleToReduce()
            {
                var testData = PopulateTestData(false);

                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.Reduce("Single", true);

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

                testData.Verify();
            }
コード例 #2
0
ファイル: TestForRecordReduce.cs プロジェクト: Zocdoc/ZocMon
            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.Reduce("");

                reduceStatus.VerifyAll();
            }