public void GroupTimesDefault2Test() { var times = _serie2.TimeRanges(t => t.ByTrigger(i => i.Value > 5)); times.Count.Should().Be(2); times[0].Start.Should().Be(new DateTime(1000, 1, 1, 0, 0, 0, DateTimeKind.Utc)); times[0].End.Should().Be(new DateTime(1000, 1, 1, 0, 1, 0, DateTimeKind.Utc)); times[1].Start.Should().Be(new DateTime(1000, 1, 1, 0, 8, 0, DateTimeKind.Utc)); times[1].End.Should().Be(new DateTime(1000, 1, 1, 0, 14, 0, DateTimeKind.Utc)); }
public void GroupTimesDefault_EndIsTrigger_NextIsNull_Test() { _serie3.EndTime = new DateTime(1000, 1, 1, 0, 18, 0, DateTimeKind.Utc); _serie3.NextRow = null; var times = _serie3.TimeRanges(t => t.ByTrigger(i => i.Value > 5)); times.Count.Should().Be(3); times[0].Start.Should().Be(new DateTime(1000, 1, 1, 0, 0, 0, DateTimeKind.Utc)); times[0].End.Should().Be(new DateTime(1000, 1, 1, 0, 1, 0, DateTimeKind.Utc)); times[1].Start.Should().Be(new DateTime(1000, 1, 1, 0, 8, 0, DateTimeKind.Utc)); times[1].End.Should().Be(new DateTime(1000, 1, 1, 0, 14, 0, DateTimeKind.Utc)); times[2].Start.Should().Be(new DateTime(1000, 1, 1, 0, 18, 0, DateTimeKind.Utc)); times[2].End.Should().Be(new DateTime(1000, 1, 1, 0, 18, 0, DateTimeKind.Utc)); }