Rene Dudfield: Draft 2 of, ^Let's write a unit test!^

So, I started writing this for people who want to ‘contribute’ to Community projects, and also Free Libre or Open source projects. Maybe you’d like to get involved, but are unsure of where to begin? Follow along with this tutorial, and peek at the end in the “what is a git for?” section for explanations of what some of the words mean. Draft 1, 2018/07/18 – initial draft.Draft 2, 2019/11/04 – two full unit test examples, assertions, making a pull request, use python 3 unittest substring search, “good first issue”…

Read More

How to Unit Test Your Annotation Processor using jOOR

Annotation processors can be useful as a hacky workaround to get some language feature into the Java language. jOOQ also has an annotation processor that helps validate SQL syntax for: Plain SQL usage (SQL injection risk) SQL dialect support (prevent using an Oracle only feature on MySQL) You can read about it more in detail here. Unit testing annotation processors Unit testing annotation processors is a bit more tricky than using them. Your processor hooks into the Java compiler and manipulates the compiled AST (or does other things). If you…

Read More