Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Nancy.Testing.Brower.HandleRequest shall be public
Browse files Browse the repository at this point in the history
When Nancy.Testing.Brower.HandleRequest would be public, this would allow dynamic testcases based on path and http-method. A Nunit definition would then look like this:

    [TestCase("GET", "/users")] 
    [TestCase("POST", "/users")]
    [TestCase("DELETE", "/users/3")]
  • Loading branch information
yannisgu committed Oct 8, 2014
1 parent dabe211 commit bdcc225
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Nancy.Testing/Browser.cs
Expand Up @@ -199,7 +199,7 @@ public BrowserResponse Put(Url url, Action<BrowserContext> browserContext = null
return this.HandleRequest("PUT", url, browserContext);
}

private BrowserResponse HandleRequest(string method, Url url, Action<BrowserContext> browserContext)
public BrowserResponse HandleRequest(string method, Url url, Action<BrowserContext> browserContext)
{
var request =
CreateRequest(method, url, browserContext ?? (with => {}));
Expand All @@ -211,7 +211,7 @@ private BrowserResponse HandleRequest(string method, Url url, Action<BrowserCont
return response;
}

private BrowserResponse HandleRequest(string method, string path, Action<BrowserContext> browserContext)
public BrowserResponse HandleRequest(string method, string path, Action<BrowserContext> browserContext)
{
var url = Uri.IsWellFormedUriString(path, UriKind.Relative)
? new Url {Path = path}
Expand Down

0 comments on commit bdcc225

Please sign in to comment.