Last night, my fellow LosTechies geek Jason , wanted me to check out something he was trying to do in a MonoRail controller test. For some background and the original source code he was working with, see his Castle forum post . So here was the partial test he was working with: [Test] public void Should_have_error_summary_message_when_required_name_is_not_filled...
This is another one of those "blog it so I can remember it" posts. My last post about a similar tip was relating to asserting redirects in a MonoRail controller. This one deals with asserting which view is being rendered in your controller when only RenderView is called. Controller Code 1:...
Reading this post by Sean reminded me of when I first started using the trunk's BaseControllerTest. One nifty little property on the base test controller's mock Response object is RedirectedTo . So you can do something like this: 1: // some call on the controller that should do the redirect 2...
In a previous post , I showed some examples of how to create custom view components in MonoRail and touched on the ability to create composite view components. Since then I've refactored towards the use of interfaces which I think is a cleaner approach, so I thought I'd share. First, let's review the...
Posted to
joeyDotNet
by
joeyDotNet
on 05-15-2007
Filed under: refactoring, c#, monorail, castle, tdd, patterns