How to write your own Matchers with ScalaTest

I just love the assertion syntax of ScalaTest. It’s easy to read and easy to write and looks like this: 23 should be >= (12) Even if you know nothing about ScalaTest it should be easy to understand whats this assertion is about. But what when your assertions get more complex? Like this: new Frog().color.getGreen() [...]

Ratchet Tests with ScalaTest

Ever found more broken things in a project than you possible could fix in one go? I’m exactly in that situation. We have a test which checks for certain dependencies in our project. The problem: We discovered that the test was broken and didn’t report all disallowed dependencies. We do know how to fix it, [...]

Posted in: Softwaredevelopment by Jens Schauder 4 Comments , ,

Manipulating Test Execution with ScalaTest

My favorite feature in the JUnit are Rules. With Rules you can manipulate the execution of your test, by wrapping your own code around the test execution. I have used this for setting up databases for test, making sure they execute in the EDT, limiting legal test execution time and for set up and tear [...]

Posted in: Softwaredevelopment by Jens Schauder 8 Comments , , , ,