Starter Package

I am recording the second version of the starter package. I will try to minimize the inconsistencies caused by this, but because I release new lessons as soon as I have finished them, it is possible that I cannot avoid them entirely.

I am currently recording the topic: Creating Test Data.

The starter package helps you to learn all the skills you need when you are writing unit tests for Spring web applications. This package consists of seven topics:

The Introduction to JUnit 4 topic helps you to get started with JUnit 4. You will learn to write your first test class, and understand how you can use JUnit 4 test runners and JUnit 4 rules.

The Creating Test Data topic helps you to create test data by using the new keyword, factory methods, and test data builders. After you have finished this topic, you will also understand the pros and cons of each technique, and you can select the right tool for the job.

The Writing Assertions topic describes how you can write assertions by using the JUnit 4 assertion API, Hamcrest, and AssertJ. After you have finished this topic, you can use all these tools, but you also understand why I write my assertions by using AssertJ.

The Introduction to Test Doubles topic describes how different test doubles work and helps you to understand when you should use them.

The Creating Test Doubles With Mockito topic describes how you can create different test doubles with Mockito. You will also learn how you can clean up your test code by using Java 8.

The Introduction to Unit Testing topic helps you to get started with unit testing. This topic helps you to understand why you should write nested unit tests, describes how you can write them, and identifies five best practices of nested unit tests. Also, you will learn why you use the JUnitParams library when you are writing parameterized tests with JUnit 4. Finally, this topic also describes how you can run your unit tests with Maven and Gradle.

The Writing Unit Tests for Spring Web Applications topic helps you to write unit tests for Spring web applications. You will learn to configure the system under test, and write unit tests for both normal Spring MVC controllers and Spring MVC REST APIs.