Archive for October, 2008

How to extend NUnit to support transaction rollback?

Thursday, October 30th, 2008

The code for this article you can download here.
I create some unit tests which should test functionality connected with databases. I know that there are a lot of posts about not to test against database but from my experience I think it is better than using Mocks instead of. What I want is to have [...]

NHibernate.DuplicateMappingException : Duplicate class/entity mapping

Monday, October 27th, 2008

This exception occures when I’ve started my unit tests. In my case it occurres because I have specified
<mapping assembly="<assembly_name>"/>
in NHibernate configuration file. I guess that somehow hbm files and assembly that embedes them are both taken into account by NHibernate engine in the case of running tests. When I removed this element from configuration [...]

How to use a custom xsd when edit a XML file in Visual Studio?

Monday, October 27th, 2008

In one of my projects people use NHibernate for accessing database. Today, I saw that when some xml file (mapping or configuration) is edited Visual Studio doesn’t provide intellisense and validation of the schema. Moreover, i found no one in the team to use xsd schemas provided by Hibernate.
The question is how to use custom [...]

Stupid situation with Mozilla cache

Friday, October 24th, 2008

Today, i ran into a situation which make me upset.
My environment is MS VS 2008, ASP.Net MVC, ExtJS. Web sites are debugged using internal VS 2008 IIS and Firebug.
I wrote a class in Javascript and after some tests i became to a moment when I needed to extend it. Let’s say that I need several [...]