コード例 #1
0
        public void TestConstructor_PropertyNameCaseInsenstive()
        {
            var propertyName = "nullableid";
            var t            = typeof(LinqFilterTestClass);
            var property     = t.GetProperty("NullableId");
            var filter       = new SimplePropertyOperator <LinqFilterTestClass>(propertyName);

            Assert.AreEqual(property, filter.PropertyInfo);
            Assert.IsTrue(filter.IsNullable);
        }
コード例 #2
0
        public void TestConstructor_NonNullableProperty()
        {
            var propertyName = "Id";
            var t            = typeof(LinqFilterTestClass);
            var property     = t.GetProperty(propertyName);
            var filter       = new SimplePropertyOperator <LinqFilterTestClass>(propertyName);

            Assert.AreEqual(property, filter.PropertyInfo);
            Assert.IsFalse(filter.IsNullable);
        }