dimanche 24 mai 2015

How Scala Playframework 2 unit test in memory database create and clean up

I'm new in Play with Scala. I have relational database. I would like to write unit test. I want to use H2 in memory database. I have database DDl script to generate all relational tables in database and to populate table with test data.

I want to drop table or database to clean up whole database for each unit test. How can I create database, populate database and drop database in my unit test. I'm open to use any unit test framework.

Please suggest me how can achieve this goal? Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire