Simon Green's Developer Blog
Developing .NET in the cold white north ...

Using VistaDB for unit testing (even if you target SQL Server)

Wednesday, 21 November 2007 16:06 by Simon

In case you aren't familiar with it, VistaDB is a lightweight, embedded database engine written entirely in managed code. It is a fantastic product that is coming on in leaps and bounds. Their aim is to be fully SQL compatible with SQL Server and are even adding support for TSQL.

I've used in on a few of my own projects and have been very impressed (I have a forum application with a 4Gb SQL Server database and approximately 2.5 million posts that I have just started converting to use it).

Even if you decide that you don't need it though it may still be worth looking at for testing purposes.

The client project I'm currently working on uses NHibernate for the persistence layer. Having developed an NHibernate Dialect and Driver for VistaDB (which I need to publish!) we've been able to use this when running unit tests. Instead of having to setup databases we can just create an in-memory database for use by the unit tests which is destroyed when they are finished. It is quick, convenient and avoids a lot of dependency issues PLUS it runs Linux / MONO (our app is cross platform).

 


Tags:   , ,
Categories:   .NET | Build
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

NUnitAspInjector Project

Sunday, 9 October 2005 16:29 by Simon

This is a helper library to make unit testing with NUnit, NUnitAsp and NMock easier. It builds on some of the ideas here and also adds some new features such as the ability to create unit tests that match the rendered output of a page or control against a base-line image. TDD for HTML and CSS !

I still have to do a complete write-up on how to use it but for those that like to download and explore, here it is:

http://www.intesoft.net/NUnitAspInjector/


Tags:   , ,
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

VistaDB Driver and Dialect for NHibernate

Sunday, 3 July 2005 16:12 by Simon

I've just started work on a VistaDB driver and dialect for NHibernate.

NHibernate is an excellent OR/M (Object Relational Mapping) Object Persistence framework for .NET and VistaDB is an embedded database designed to server as a replacement to Microsoft JET/ MSDE and Borland BDE.

Putting the two together should enable easy xcopy deployment of applications with practically no configuration, something especially useful for people evaluating an application, while still allowing the backend database to be replaced with something more heavy-duty if required and available (such as SQL Server or Oracle).

I have the main functionality working (saving and loading objects) although due to the way that identity columns work in VistaDB I have needed to change a line in NHibernate to support it (hopefully will be accepted as it does not effect any other drivers).

The next step is to ensure all the data-types are mapped to the correct (and supported) types in VistaDB and also to make sure the NHibernate NUnit tests run ok.

 

Tags:   , ,
Categories:   .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed