O'Reilly logo

NHibernate 4.x Cookbook - Second Edition by Jason Dentler, Alexander Zaytsev, Gunnar Liljas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Fast testing with the SQLite in-memory database

Running a full range of tests for a large NHibernate application can take some time. In this recipe, we will show you how to use SQLite's in-memory database to speed up this process.

Note

This is not meant to replace running integration tests against the real RDBMS before moving to production. Rather, it is a smoke test to provide feedback to developers quickly before running the slower integration tests.

Getting ready

Download and install NUnit from http://nunit.org.

Note

This recipe will work with other test frameworks such as MSTest, MbUnit, and xUnit. Just replace the NUnit-specific attributes with those for your preferred framework.

How to do it...

  1. Create a new empty class library project.
  2. Add references ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required