Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Functional controller testing for ASP.Net MVC
JavaScript C# ASP
Branch: master

Adding example xunit test

latest commit 86ded51791
Chris Ortman authored

README.markdown

This project aims to provide functional controller tests to asp.net applications

98% of the work in it came from Steve Sanderson http://blog.stevensanderson.com/2009/06/11/integration-testing-your-aspnet-mvc-application/

I couldn't find anywhere that the code was hosted, so I am putting it out here on github and have added some things to make it feel a little more like rails.

///

/// Summary description for UnitTest1 /// [TestClass] public class UnitTest1 : MvcIntegrationTestFramework.MvcControllerTest { public UnitTest1() { // // TODO: Add constructor logic here // }

    [TestInitialize]
    public void Setup() 
    {
        InitializeAspNetRuntime();

        Get("home/index");
    }

    [TestMethod]
    public void TestMethod1()
    {
        Assert.AreEqual(200,Response.StatusCode);
    }
}


  Post("registration/create", new
        {
            Form = new
            {
                Email = "yogibear@jellystone.forest",
                Password = "welcome",
                ConfirmPassword = "welcome"
            }
        });
Something went wrong with that request. Please try again.