internal static void ShouldOccurBetween(this ITimestampedDto child, ITimedDto containingAncestor) { TimeUtils.TimestampToDateTimeOffset(child.Timestamp) .Should() .BeOnOrAfter(TimeUtils.TimestampToDateTimeOffset(containingAncestor.Timestamp)) .And .BeOnOrBefore(TimeUtils.TimestampDurationToEndDateTimeOffset(containingAncestor.Timestamp, containingAncestor.Duration)); }
private void FullFwAssertValid(ITimestampedDto timestampedDto) { timestampedDto.Should().NotBeNull(); if (_sampleAppClientCallTiming != null) { timestampedDto.ShouldOccurBetween(_sampleAppClientCallTiming); } }
internal static void ShouldOccurBefore(this ITimedDto first, ITimestampedDto second) => TimeUtils.ToEndDateTime(first.Timestamp, first.Duration).Should().BeOnOrBefore(TimeUtils.ToDateTime(second.Timestamp));