How to Replace Rules in JUnit 5 - Code Affine
The recently published JUnit 5 (aka JUnit Lambda) alpha release caught my interest, and while skimming through the documentation I noticed that rules are gone – as well as runners and class rules. According to the user guide, these partially competing concepts have been replaced by a single consistent extension model.
Over the years, Frank and I wrote several rules to help with recurring tasks like testing SWT UIs, ignoring tests in certain environments, registering (test) OSGi services, running tests in separate threads, and some more.
Therefore, I was particularly interested in what it would take to transform existing rules to the new concept so that they could run natively on JUnit 5. To explore the capabilities of extensions, I picked two rules with quite different characteristics and tried to migrate them to JUnit 5.
Read full article from How to Replace Rules in JUnit 5 - Code Affine
No comments:
Post a Comment