Dec 17, 2009

A dummy example of html helper

public static class HtmlHelperExt
{
    public static string GetDebugInfo(this HtmlHelper html)
    {
        return "Hello";
    }

    public static void Debug(this HtmlHelper html)
    {
        var writer = html.ViewContext.HttpContext.Response.Output;
        writer.Write("

hello

"); } }

Dec 9, 2009

definition of two kinds of test

State-based testing (also called state verification)
determines whether the exercised method worked correctly by examining the state of the system under test and its collaborators (dependencies) after the method is exercised.
Interaction testing
is testing how an object sends input to or receives input from other objects—how that object interacts with other objects.