Integration Testing with Spring: A Custom Configuration
Here’s the situation: We have a couple of configuration files we use for integration tests. Each of them is a different set of real and mock objects. Some of the objects have behaviors set on them (using Mockito.when) in the configuration classes. Now, one of the integration tests need one Read more…
Integration Testing with Spring – Testing A REST API
After we understand how to use mocks in Spring in integration tests, let’s take a look at a setup for testing a REST service that uses a dependency we want to mock. API testing is a usual integration test scenario, and with those, we might need to mock dependencies buried Read more…
Unit Tests Anti-patterns: TDD without refactoring
Anti-patterns are patterns with negative consequences. In this series I’m going to tackle those patterns, explain what they signify in terms of risks, and what to do instead. Let’s look at a pattern common to people who start out on their TDD journey: They forget to refactor. When they do, Read more…