コード例 #1
0
        public void SummingAggregation_Produces_Sum()
        {
            var aggregator = new PointsAggregator(_measurements, new EmptyFilter(), new SummingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(107, result.X); //sums up x and ys
            Assert.Equal(30, result.Y);
        }
コード例 #2
0
        public void LowPassAveragingAggregator_Applys_Filter()
        {
            var aggregator = new PointsAggregator(_measurements, new LowPassFilter(), new AveragingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(3, result.X);
            Assert.Equal(12, result.Y);
        }
コード例 #3
0
        public void HighPassSummingAggregator_Applys_Filter()
        {
            var aggregator = new PointsAggregator(_measurements, new HighPassFilter(), new SummingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(105, result.X); // add everything that that is > 2 together
            Assert.Equal(15, result.Y);
        }
コード例 #4
0
ファイル: AggregationTests.cs プロジェクト: perikarion/Katas
        public void LowPassAveragingAggregator_Applys_Filter()
        {
            var aggregator = new Algorithm.Composition.PointsAggregator(_measurements, new LowPassFilter(), new AveragingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(3, result.X);
            Assert.Equal(12, result.Y);
        }
コード例 #5
0
        public void AveragingAggregagtor_Produces_Average()
        {
            var aggregator = new PointsAggregator(_measurements, new EmptyFilter(), new AveragingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(35, result.X);
            Assert.Equal(10, result.Y);
        }
コード例 #6
0
ファイル: AggregationTests.cs プロジェクト: perikarion/Katas
        public void SummingAggregation_Produces_Sum()
        {
            var aggregator = new Algorithm.Composition.PointsAggregator(_measurements, new EmptyFilter(), new SummingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(107, result.X);
            Assert.Equal(30, result.Y);
        }
コード例 #7
0
ファイル: AggregationTests.cs プロジェクト: perikarion/Katas
        public void HighPassSummingAggregator_Applys_Filter()
        {
            var aggregator = new Algorithm.Composition.PointsAggregator(_measurements, new HighPassFilter(), new SummingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(105, result.X);
            Assert.Equal(15, result.Y);
        }
コード例 #8
0
ファイル: AggregationTests.cs プロジェクト: perikarion/Katas
        public void AveragingAggregagtor_Produces_Average()
        {
            var aggregator = new Algorithm.Composition.PointsAggregator(_measurements, new EmptyFilter(), new AveragingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(35, result.X);
            Assert.Equal(10, result.Y);
        }
コード例 #9
0
        public void SummingAggregation_Produces_Sum()
        {
            var aggregator = new Algorithm.Composition.PointsAggregator(_measurements, new EmptyFilter(), new SummingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(107, result.X);
            Assert.Equal(30, result.Y);
        }
コード例 #10
0
        public void HighPassSummingAggregator_Applys_Filter()
        {
            var aggregator = new Algorithm.Composition.PointsAggregator(_measurements, new HighPassFilter(), new SummingStrategy());

            var result = aggregator.Aggregate();

            Assert.Equal(105, result.X);
            Assert.Equal(15, result.Y);
        }
コード例 #11
0
        public Measurement Aggregate()
        {
            var aggregator = new PointsAggregator(_measurements, new HighPassFilter(), new SummingStrategy());

            return(aggregator.Aggregate());
        }
コード例 #12
0
 public virtual Measurement Aggregate()
 {
     return(highPassSumming.Aggregate());
 }