Skip to content

{ Monthly Archives } March 2010

Fluent Configurator – thoughts on getting a design

In a previous post series I wrote about Configuration DSLs – I’m now just looking at this from another angle of going back to some reading about the microsoft mechanism itself. A quick note about the previous approach. The configuration is centralised into one Configuration object and then the application has this available. This is [...]

Fluent Controller MvcContrib – Part II – Coding the Controller Actions and Redirects

In the last entry, we created designed our controller through a test: [Test] public void SuccessfulIndex() { GivenController.As<UserController>() .ShouldRenderItself(RestfulAction.Index) .WhenCalling(x => x.Index()); } Now, we need to code this: A Fluent Controlller in action In fact, to make test run above, you need to do nothing else than inherit from the AbstractRestfulFluentController. using MvcContrib.FluentController; public [...]

Fluent Controller MvcContrib – Part I – Designing Controller Actions and Redirects

In an earlier post/03/test-automation-pyramid-asp-net-mvc/ I said that I unit test my controllers. What I didn’t say was that I (with most of the work done by my colleague Mark and field tested by Gurpreet) had write code to make this possible. To unit test our controllers we put a layer of code that was an [...]

test-automation-pyramid-asp-net-mvc

Test Automation Pyramid in ASP.NET MVC This is a reposting of my comments from Mike Cohn’s Test Automation Pyramid I often use Mike’s Test Automation Pyramid to explain to clients’ testers and developers how to structure a test strategy. It has proved the most effective rubric (say compared with the Brian Marick’s Quadrant’s model:http://www.exampler.com/old-blog/2003/08/21/ – [...]

validation-specification-testing

Validation specification testing for c# domain entities I have just been revisiting fluent configuration in the context of writing a fluent tester for validation of my domain entities. In that post, I wrote my test assertions as: ValidMO.ImageBanner.ShouldNotBeNull(); ValidMO.ImageBanner.IsValid().ShouldBeTrue(); new ImageBanner().SetupWithDefaultValuesFrom(ValidMO.ImageBanner).IsValid().ShouldBeTrue(); new ImageBanner { Name = "" }.SetupWithDefaultValuesFrom(ValidMO.ImageBanner).IsValid().ShouldBeFalse(); This is okay and I have had [...]