This is the second part of my blog series which focuses on the mocking framework Mockito and its interaction with Scala and ScalaTest . This time its all about testing Scala functions. Personally I learned a lot of Scala's way of handling functions by testing them and I hope people learn something from this blog post as well. Aside from the previous mentioned libraries, ScalaCheck , a property-based testing tool for Scala, is also being used to verify some of the function's behaviour. As in the last part the example project on github is being used to illustrate the examples with actual code.
This is the start of a new blog series which focuses on the mocking framework Mockito and its interaction with Scala and ScalaTest . Each part of the series concentrates on one aspect of testing and explains how the mentioned frameworks facilitate testing in this area. An example project on github illustrates the corresponding code. The first part is an easy start and deals with exceptions.
This post explains how to simply start a new Scala project with the Scala build tool (sbt) . Furthermore it describes how to integrate ScalaTest , JUnit and the mocking framework Mockito into the new project and gives some simple usage examples.