April 2008 Entries
While trying to get up to speed on using Castle’s ActiveRecord framework, one of the first things I needed to do was figure out how to test my ActiveRecord objects. There are some a good articles that describes how to us a base test class to get your unit tests up and running. In a nutshell you need to have a TestFixtureStartup to initialize ActiveRecord. You need to call the ActiveRecordStarter.Initialize to get AR ready to go. However, I have yet to find to opposite of this method to stop ActiveRecord...
Castle’s ActiveRecord frame work is an easy way to get introduced to NHibernate if you’re not familiar with setting up and using NHibernate (which I’m not). However many people are not fond of the ActiveRecord pattern. It can be a leaky abstraction, putting persistence related functions on your domain model is not a very clean separation of concerns for many people. I tend to agree with this. It really does depend on the complexity of your application. When learning about AR I read a lot of blog...