public void TheSelectionShouldBe(string Url, out string Selected, [Default("NONE")] out ArgumentExpectation Arguments) { var env = new Dictionary <string, object>(); var leaf = _tree.Select(Url); Selected = leaf.Pattern; leaf.SetValues(env, RouteTree.ToSegments(Url)); Arguments = new ArgumentExpectation(env); }
public void TheResultShouldBe([SelectionValues("GET", "POST", "DELETE", "PUT", "HEAD")] string HttpMethod, string Url, out int Status, out string Body, [Default("NONE")] out ArgumentExpectation Arguments) { var env = new Dictionary <string, object>(); env.RelativeUrl(Url); env.HttpMethod(HttpMethod); _router.Invoke(env).Wait(); Status = env.StatusCode(); Body = env.Response().ReadAsText(); Arguments = new ArgumentExpectation(env); }
protected bool Equals(ArgumentExpectation other) { return(_spread.SequenceEqual(other._spread) && _args.SequenceEqual(other._args)); }