Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 protected bool Equals(ArgumentExpectation other)
 {
     return(_spread.SequenceEqual(other._spread) && _args.SequenceEqual(other._args));
 }