zspitz / ExpressionTreeToString

String representations of expression trees + library of expression tree objects
MIT License
151 stars 12 forks source link

Add Roslyn-based tests for factory methods writer/visitor #66

Open zspitz opened 4 years ago

zspitz commented 4 years ago

While the C# and VB writer/visitors have invalid syntactic elements, the factory methods should compile and run as-is whether the language is C# or VB.

We should create an instance of the Roslyn compiler and try to compile and run the resulting code. If it compiles and runs without error, the unit test is successful.

zspitz commented 4 years ago

We could also test that the generated expression tree looks the same as the original, via one of the renderings.