private string Convert(Expression <Func <bool> > expression, ComponentsExpressionToStringConverter converter) { return(converter.ConvertTo(expression, typeof(string)) as string); }
public void TestOredComponents() { var converter = new ComponentsExpressionToStringConverter(); Assert.Equal("First or Second", Convert(() => First || Second, converter)); }
public void TestThreeOredComponents() { var converter = new ComponentsExpressionToStringConverter(); Assert.Equal("(First or Second) or Third", Convert(() => First || Second || Third, converter)); }
public void TestSingleComponent() { var converter = new ComponentsExpressionToStringConverter(); Assert.Equal("First", Convert(() => First, converter)); }