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 | |
Результат | string |
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(); }
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(); }