Well I’ve managed to check some basic code into the mainline ASP.net Fitnesse repository, it’s not much but mainly because Andy is having trouble with his ISP back in the UK and unable to get our integration server up and running again, we’re working on a solution but as it stands I don’t want to check in too much and find a feedback loop of a month or so on my changes. I’m also looking into the feasibility of finding my own server solution so I can host a few things if need be.
The other reason it’s not much is that this is all I’ve managed to come up with just yet, it’s my first real foray into Castle and MonoRail and it’s really kicking my butt at the moment.
The concepts are in but some of the code I’m putting together is obviously wrong. Luckily it’s all surrounded by unit tests so I should be able to refactor later as I get to grips a bit more with how it should be written.
My main problem I’m coming up against at the moment is testing the components, my first architecture decisions killed me straight off, I wanted to work to interfaces as I generally like doing (just because it enforces a design by contract and really allows easy slotting in of mock objects into tests) however, I can’t for the life of me work out how to wrap an ActiveRecord into a simpler interface, the problems that come from this at the point of saving the objects are killer.
I’ve also had a hard time leaving behind composite keys, and running with simple id’s backed by a database constraint. It still doesn’t seem right to me that I have a requirement that wiki pages belong to projects and the project and wiki page name combined must be unique (I.e. you can have the same page name as long as it’s in a different project) but I can’t enforce this on the ActiveRecord object itself, perhaps I’m missing something.
My other problem is that I can’t use the BaseControllerTest to test a controller that has scaffolding enabled. It spews out an error saying
“You must enable scaffolding support on the configuration file, or, to use the standard ActiveRecord support copy the necessary assemblies to the bin folder.”
I’ve tried copying the assemblies to the bin file and putting the isWeb=true on the active record node of the test config files, all to no avail, perhaps Ivan or Tim can shed some light for me.
Anyway apart from the few issues I’m really pleased with what MonoRail offers me in terms of control and flexibility (and great testability) so I’m going to persevere.