longevity

A Persistence Framework for Scala and NoSQL

View project on GitHub

testing your domain model

Longevity provides many tools for you to use in testing. For starters, there are in-memory versions of all your repositories. We also provide tools for you to do database integration tests - that is, tests that exercise the repository against a real database. The RepoCrudSpec tests basic CRUD operations for all your aggregates out of the box. And you can subclass QuerySpec to easily exercise any queries you rely on.

RepoCrudSpec and QuerySpec are both ScalaTest fixtures. While we plan to write equivalents for specs2, it is currently not very high on our priority list. Please let us know if you would like to see these, and we will adjust the priority. Better yet, submit a pull request! We will be happy to assist you in crafting the code.
prev: limitations on cassandra queries
up: user manual
next: in memory repositories