Ejemplo n.º 1
0
        public void SetUp()
        {
            dynamic body = new ExpandoObject();

            body.test = "bla";

            _decoratorRequest = new DecoratorRequest
            {
                Method  = "GET",
                Path    = "test",
                Headers = new Dictionary <string, string> {
                    { "foo", "bar" }
                },
                Query = new Dictionary <string, string> {
                    { "baz", "bam" }
                },
                Body = body
            };
        }
        public void Setup()
        {
            dynamic newBody = new ExpandoObject();

            newBody.foo = "bar";
            newBody.baz = "bam";

            _newRequest = new DecoratorRequest
            {
                Method  = "GET",
                Path    = "test",
                Headers = new Dictionary <string, string> {
                    { "foo", "bar" }
                },
                Query = new Dictionary <string, string> {
                    { "baz", "bam" }
                },
                Body = newBody
            };

            _decoratorResponse = new ChangeOriginalRequest(_newRequest);
        }
 public ChangeOriginalRequest(DecoratorRequest newRequest) : base(DecoratorConstants.ChangeOriginalStatusCode, DecoratorConstants.DefaultHeaders, newRequest.ToExpandoObject())
 {
 }