예제 #1
0
        public void should_create_date_const_expression()
        {
            var value        = "2018-05-15";
            var propertyInfo = new PropertyInfoProvider().GetPropertyInfoFromName("ADate", typeof(TestDocument));
            var sut          = new ValueProcessor();

            var result = sut.Process(value, propertyInfo.PropertyType);

            result.Value.Should().Be(DateTime.Parse(value));
        }
예제 #2
0
        public void should_create_string_const_expression()
        {
            var value        = "Some text";
            var propertyInfo = new PropertyInfoProvider().GetPropertyInfoFromName("Text", typeof(TestDocument));
            var sut          = new ValueProcessor();

            var result = sut.Process(value, propertyInfo.PropertyType);

            result.Value.Should().Be(value);
        }