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

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

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

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