czwartek, 14 listopada 2013

Partial mocking and spying with Spock

I think that everyone sooner or later gets to the point where the setup of the test class becomes ridicoulous comparing to the test methods. I recently had to update some GWT servlet class, which was missing JUnit tests. So I started with standard way of mocking out external dependencies, but it quickly came out that not that simple...

środa, 6 listopada 2013

Mocking and verifying collabolators in Spock and Mockito

Recently I started writing tests in Groovy for my apps. I found groovy a nice language for testing, thanks to its syntax. I also like the idea of BDD, and that's how I found Spock - a great BDD testing library.