コード例 #1
0
        public void TestCreateFilterShouldCreateDateTimeFilterIfColumnDoesNotHasNulls()
        {
            var column = new ColumnBuilder()
                         .WithValue(DateTime.MinValue)
                         .WithValue(DateTime.MaxValue)
                         .Build();
            var root   = new DateTimeFilterTreeRoot(string.Empty, column);
            var result = root.CreateFilter();

            Assert.That(result is DateTimeFilter);
        }
コード例 #2
0
        public void TestCreateFilterShouldCreateNullableDateTimeFilterIfColumnHasNulls()
        {
            var column = new ColumnBuilder()
                         .WithValue(DateTime.MinValue)
                         .WithValue(DateTime.MaxValue)
                         .WithNulls().Build();
            var root   = new DateTimeFilterTreeRoot(string.Empty, column);
            var result = (DateTimeFilter)root.CreateFilter();

            Assert.That(result.LowerValue, Is.EqualTo(DateTime.MinValue));
            Assert.That(result.UpperValue, Is.EqualTo(DateTime.MaxValue));
            Assert.That(result.IncludeNull, Is.True);
        }