Skip to content

Resolves #40. #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2014
Merged

Resolves #40. #41

merged 1 commit into from
Nov 11, 2014

Conversation

AlexArchive
Copy link
Contributor

If I understood correctly, this solves issue #40.

You will now be able to write custom assertion methods like this one:

public static class ControllerResultTestExtensions
{
    public static void ShouldGiveHttpUnauthorizedResult<TController>(
        this ControllerResultTest<TController> result) where TController : Controller
    {
        result.ValidateActionReturnType<HttpUnauthorizedResult>();
        var httpUnauthorizedResult = (HttpUnauthorizedResult) result.ActionResult;
        if (httpUnauthorizedResult.StatusCode != 1337)
        {
        }
    }
}

(Arbitrary example.)

We will need to update the documentation (and maybe add some XML comments in the future.)

@robdmoore
Copy link
Member

Nice! Thanks mate :)

robdmoore added a commit that referenced this pull request Nov 11, 2014
@robdmoore robdmoore merged commit 78594c5 into TestStack:master Nov 11, 2014
robdmoore added a commit that referenced this pull request Nov 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants