Example #1
0
        public void MeanByTimeIncludePreviousTest()
        {
            var sw      = Stopwatch.StartNew();
            var result  = _unitUnderTest50.GroupBySeconds(5, a => a.MeanByTime()).Rows;
            var result2 =
                _unitUnderTest50.GroupBySeconds(5, a => a.MeanByTimeIncludePreviousAndNext()).RemoveNulls().Rows;

            result.Count.Should().Be(result2.Count);

            sw.Stop();
        }
Example #2
0
        public void GroupBySeconds()
        {
            var sw      = Stopwatch.StartNew();
            var result  = _unitUnderTest40s.GroupBySeconds(30, a => a.First()).Rows;
            var result2 = _unitUnderTest40s.Group(c => c.ByTime.Seconds(30).Aggregate(a => a.First())).Rows;

            result.First().TimeUtc.Should().Be(new DateTime(2010, 1, 1, 13, 27, 0, DateTimeKind.Utc));
            result.SequenceEqual(result2).Should().BeTrue();
            sw.Stop();
        }