Some of you might have noticed that I have written only a handful of new blog posts during the last few years. One reason for this is that during these years I have been writing and recording material for a new JUnit 5 course. After a year I kind of realized that producing good videos […] Read More
JUnit 5
Writing Unit Tests for a Spring MVC REST API: Writing Data
This blog post describes how we can send POST requests to the system under test, explains how we can configure the request body of the HTTP request, and describes how we can verify that our REST API is working as expected when validation fails and when validation is successful. Read More
Writing Unit Tests for a Spring MVC REST API: Returning a List
This blog post describes how we can ensure that the system under test returns the correct HTTP status code and verify that the system under test returns the correct information when we are writing unit tests for a Spring MVC REST API endpoint that returns a list. Read More
Writing Unit Tests for a Spring MVC REST API: Returning a Single Item
This blog post describes how we can ensure that the system under test returns the correct HTTP status code and verify that the system under test returns the correct information when we are writing unit tests for a Spring MVC REST API endpoint that returns the information of a single item. Read More
Writing Unit Tests for a Spring MVC REST API: Configuration
This blog post describes how we can configure the Spring MVC Test framework (aka MockMvc) by using the standalone configuration when we are writing unit tests for a Spring MVC REST API. Read More
Writing Unit Tests for Spring MVC Controllers: Forms
This blog post describes how we can submit a form by using the Spring MVC Test framework, explains how we can ensure that the system under test is working as expected when validation fails, and describes how we can verify that the system under test is working as expected when validation is successful. Read More