O'Reilly logo

NHibernate 3 Beginner's Guide by Gabriel N. Schenker

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

Time for action – Using SQLite in our tests

In this short exercise, we will implement the necessary steps to be able to use SQLite in our database tests.

  1. Open Visual Studio and load the OrderingSystem solution.
  2. Add a folder called UsingSqLite to the OrderingSystem.Tests project.
  3. Add a reference to the assembly System.Data.SQLite.dll of the OrderingSystem.Tests project. The said assembly should be located in the lib sub-folder of your samples folder.
  4. Add a new class called entity_mapping_spec_for_sqlite to the preceding folder.
  5. Make the class inherit from the base class MappingSpecificationBase and decorate it with the TestFixture attribute, as shown in the following code snippet:
    [TestFixture] public class entity_mapping_spec_for_sqlite: MappingSpecificationBase ...

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