We see our first unit test, written with a framework called JUnit. The test
method is annotated with @Test
, telling JUnit to run this method during the
test. Annotations are used a lot, especially when we start using Spring or
Java EE. They are meta-information to guide our frameworks on which magic
incantations to perform.
We also have a setup()
method with an annotation
@Before
. This is called before our tests are run.
We will test all the words in the word library, to see whether the letters all match.
We hope you enjoyed this tutorial. If you did, you will also enjoy our courses. We suggest you start with Extreme Java - Advanced Java, followed by Extreme Java - Concurrency Performance for Java 8.
We deliver relevant courses, by top Java developers to produce more resourceful and efficient programmers within their organisations.
We can help make your Java application run faster and trouble-shoot concurrency and performance bugs...