Skip to content

acamino/fte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FluentMVCTesting.Extensions

NuGet version

This library provides XML extensions for fluent unit testing of ASP.NET MVC Controllers.

How to use it

[Test]
public void ShouldRespondWithXml()
{
    var controller = new CallController();
    controller
        .WithCallTo(c => c.Connect("555-5555"))
        .ShouldReturnXmlResult(data =>
        {
            StringAssert.Contains(
                "Thanks for contacting us", data.XPathSelectElement("Response/Say").Value);
            Assert.That(data.XPathSelectElement("Response/Dial").Value, Is.EqualTo("555-5555"));
        });
}

About

XML extensions for fluent unit testing of ASP.NET MVC Controllers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages