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

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

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

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