示例#1
0
 private string Convert(Expression <Func <bool> > expression, ComponentsExpressionToStringConverter converter)
 {
     return(converter.ConvertTo(expression, typeof(string)) as string);
 }
示例#2
0
        public void TestOredComponents()
        {
            var converter = new ComponentsExpressionToStringConverter();

            Assert.Equal("First or Second", Convert(() => First || Second, converter));
        }
示例#3
0
        public void TestThreeOredComponents()
        {
            var converter = new ComponentsExpressionToStringConverter();

            Assert.Equal("(First or Second) or Third", Convert(() => First || Second || Third, converter));
        }
示例#4
0
        public void TestSingleComponent()
        {
            var converter = new ComponentsExpressionToStringConverter();

            Assert.Equal("First", Convert(() => First, converter));
        }