Category: Unit Testing

Testing with Specs2 and Play ReactiveMongo

Are you building a Scala PlayFramework application with ReactiveMongo? Are you testing your application with Specs2? Are some of your tests failing with the dreaded, “Can’t get ClosableLazy value after it has been closed”? Do those same tests pass, if they are run individually? If so, this post is for you! Note: A full stack trace for the dreaded ClosableLazy can be found in the Appendix of this post. In...

TestNG Basics

Unit tests are written to ensure that small units of code function as intended. When it comes to Unit tests, the higher your code coverage, the higher your confidence when refactoring and/or extending code functions and features. Unit tests play an incredibly important role when it comes to sustaining and maintaining code. TestNG is a simple, yet powerful unit test framework for Java. TestNG enables you to construct test cases...

JUnit Basics

Unit tests are written to ensure that small units of code function as intended. When it comes to Unit tests, the higher your code coverage, the higher your confidence when refactoring and/or extending code functions and features. Unit tests play an incredibly important role when it comes to sustaining and maintaining code. JUnit is a simple, yet powerful unit test framework for Java. JUnit enables you to construct test cases...