Dan Crevier's Blog

In search of a better name...

Browse by Tags

Tagged Content List
  • Blog Post: A pattern for unit testable Asp.net pages: Part 4

    Okay, now for unit tests of the code from part 3 . The goal is to completely cover RenamePageModel. First we need mock implementations of IPageContext and IDataAccess. For IPageContext, we are going to use special exception types for page not found and server errors. And, we'll add an accessor to track...
  • Blog Post: A pattern for unit testable Asp.net pages: Part 3

    In this post, I'm going to give an example of the pattern in action, built on the classes described in the last post . For the example, I've chosen something similar to the rename page on Live Folders . Here's how it should work: The Url should be of the form http://<server>/rename.aspx?path=<path...
  • Blog Post: A pattern for unit testable Asp.net pages: Part 2

    In part 1 , I gave an overview of the pattern. In this part, I will describe some of the core classes. Let's start off with the PageModel itself. It's the most simple. It is an abstract class. Subclasses must implement OnLoaded. It has an associated IPageContext (see below) that the model will use to...
  • Blog Post: A pattern for unit testable Asp.net pages: Part 1

    I previously blogged about the pattern we used in our WPF application to separate business logic from the presentation, making the business logic view and data models highly unit testable. Now that I'm working on Asp.net code for Live Folders , we've worked to come up with a similar model that separates...
Page 1 of 1 (4 items)