Flapi icon indicating copy to clipboard operation
Flapi copied to clipboard

more tests on the generated code

Open UnquietCode opened this issue 10 years ago • 1 comments

While the compiled tests are good for execution, it would be nice to perform some static analysis as well. For example, annotation values, parameter types, return types, etc. can all be tested by introspecting the classes in a test and checking for expected values.

UnquietCode avatar Jan 20 '15 19:01 UnquietCode

One idea for this is to create an assertion helper which introspects classes inside of the compiled classloader (in-memory compilation), done through the compiled tests harness. The helper could even be fluent and generated by Flapi itself. Something like: assert.that(clazz).method("getName").hasReturnType(String.class)

This is a non-trivial amount of work, and I'm not sure where it would be most useful. Probably then it will have to wait until a significant feature or breakage warrants the investment.

UnquietCode avatar Mar 18 '15 05:03 UnquietCode