예제 #1
0
        public void Test_GetCondition_Left_With_Nullable()
        {
            var result = new StringBuilder();

            result.Append("t => ((t.NullableDateValue >= Convert(Parse(\"2000/1/1 0:00:00\"), Nullable`1))");
            result.Append(" AndAlso (t.NullableDateValue < Convert(Parse(\"2000/1/3 0:00:00\"), Nullable`1)))");

            var condition = new DateSegmentCondition <AggregateRootSample, DateTime?>(t => t.NullableDateValue, _min, _max, Boundary.Left);

            _output.WriteLine(condition.GetCondition().ToString());
            Assert.Equal(result.ToString(), condition.GetCondition().ToString());
        }
예제 #2
0
        public void Test_GetCondition_Right()
        {
            var result = new StringBuilder();

            result.Append("t => ((t.DateValue >= Convert(Parse(\"2000/1/2 0:00:00\"), DateTime))");
            result.Append(" AndAlso (t.DateValue < Convert(Parse(\"2000/1/4 0:00:00\"), DateTime)))");

            var condition = new DateSegmentCondition <AggregateRootSample, DateTime>(t => t.DateValue, _min, _max, Boundary.Right);

            _output.WriteLine(condition.GetCondition().ToString());
            Assert.Equal(result.ToString(), condition.GetCondition().ToString());
        }