views:

145

answers:

3

Hello everyone

I want to start a test driven development with ASP.Net 3.5 (C#), NHibernate with Oracle and NUnit. Can any body refer me any tutorial about NHibernate with NUnit for beginning. Any book reference will also be appreciated.

N.B. I have seen the summer of Nhibernate video series, but it works for SQL server only not oracle.

Thanks in advance

+1  A: 

This tutorial could use a teeny bit of editing, but it's quite good and it's exactly what you're looking for: a step-by-step NHibernate tutorial using test-driven-development methods.

Jeff Sternal
But still getting problem with oracle :(
TDD
A: 

For doing TDD with NHibernate, it can be useful to set up you database into specific scenarios. One technique I've used is using an In-Memory SQLite database. Because a fresh database is created for each test, you don't have to worry about inconsistent results from running tests multiple times that a persistent database can cause. Also, the test code is redistributable without the requirement of someone else to be running an instance of Oracle, SQL Server, etc.

On a side note, integration testing with the actual database is important because behavior can differ slightly, even with a nice ORM like NHibernate.

statenjason
I'm also testing with SQLite in-memory. And I'm also in an Oracle environment. As statenjasen says, the two differ, so it doesn't replace integration tests completely (you can't use multi-queries with Oracle for example).
Martin R-L