Articles tagged hamcrest
Make Java Tests Groovy With Hamcrest
![Make Java Tests Groovy With Hamcrest](/assets-jekyll/blog/featured/okta-java-short-skew-dda56e8c260d66777c5f29c51e19d4e533c22cfae5ad52fce7c0baf1bc8a330b.jpg)
My favorite way to test Java code is with Groovy. Specifically, writing tests in Groovy with Hamcrest. In this post, I’ll walk through how to test a simple Spring Boot application with these tools. Groovy is an optionally typed dynamic language for the JVM, and can be compiled statically. That is a mouthful and I’ll explain this as we go, but for now think of Groovy as Java with lots of sugar. Groovy is a...