Spring comes with a lot of features which support integration testing. We have MockMvc, TestRestTemplate and many other useful utilities. Nevertheless, building a proper test context for our app rests in our hands, and there are some pitfalls along the road. In today's article I would like to show you how to avoid one of them
Read MoreAuthor: Mateusz Fedkowicz
When two beans collide
Today I would like to tell you about one mechanism of Spring IoC container that I think is a bit less known amongst programmers. We were not aware of it and it had caused us a bit of confusion lately. It seemed at first as if one of our beans had somehow disappeared.
Read MoreCustom fluent assertions with AssertJ
More often than not, developers put much less attention to the test code than to the production code. Libraries and frameworks, fluent APIs or just clean code in general are terms we usually connect with actual production code and not with tests. But investing some time to use them in test code can pay off very quickly.
Read MoreSome short thoughts on strategy pattern
Strategy is one of the most useful design patterns, which allows us to change algorithms or implementations of an operation during runtime. Typical use cases include validating or parsing data depending on some decisions made on the fly. And although the pattern is widely described in various sources and well known amongst programmers I think there is still a missing part in great number of examples we can find. Let me explain what I have in mind…
Read MoreBuilder pattern revisited
The idea behind builder pattern is actually quite simple – it should help you to build your objects. But let me show you today why it is so important to use and how we can adjust it with some implementation tricks to achieve different goals and coding styles.
Read More