public void TestEvaluateOnlyEnd3() { var end = new DateTime(2018, 8, 1, 0, 0, 0); var expression = new ContainsTimestampExpression(new DateTimeLiteral(end + TimeSpan.FromTicks(1)), new DateTimeInterval(null, end)); expression.Evaluate(null).Should().BeFalse("because the specified timestamp is greater than end"); }
public void TestEvaluateOnlyEnd1() { var end = new DateTime(2018, 8, 1, 0, 0, 0); var expression = new ContainsTimestampExpression(new DateTimeLiteral(end), new DateTimeInterval(null, end)); expression.Evaluate(null).Should().BeTrue("because the specified timestamp is equal to end"); }
public void TestEvaluateOnlyStart3() { var start = new DateTime(2018, 8, 1, 0, 0, 0); var expression = new ContainsTimestampExpression(new DateTimeLiteral(start + TimeSpan.FromTicks(1)), new DateTimeInterval(start, null)); expression.Evaluate(null).Should().BeTrue("because the specified timestamp is greater than start"); }
public void TestEvaluateOnlyStart1() { var start = new DateTime(2018, 8, 1, 0, 0, 0); var expression = new ContainsTimestampExpression(new DateTimeLiteral(start), new DateTimeInterval(start, null)); expression.Evaluate(null).Should().BeTrue("because the specified timestamp is equal to start"); }
public void TestEvaluateNullInterval() { var expression = new ContainsTimestampExpression(new DateTimeLiteral(DateTime.Now), new DateTimeInterval(null, null)); expression.Evaluate(null).Should().BeFalse("because nothing can be part of a null interval"); }
public void TestEvaluateNullTimestamp() { var expression = new ContainsTimestampExpression(new DateTimeLiteral(null), new DateTimeIntervalLiteral(SpecialDateTimeInterval.Today)); expression.Evaluate(null).Should().BeFalse("because a null timestamp is not part of any interval"); }