示例#1
0
        public void TestToExpandoObject()
        {
            dynamic result = _decoratorRequest.ToExpandoObject();

            Check.That(result.method).Equals("GET");
            Check.That(result.path).Equals("test");
            Check.That(result.headers).Equals(new Dictionary <string, string> {
                { "foo", "bar" }
            });
            Check.That(result.query).Equals(new Dictionary <string, string> {
                { "baz", "bam" }
            });
            Check.That(result.body.test).Equals("bla");
        }
 public ChangeOriginalRequest(DecoratorRequest newRequest) : base(DecoratorConstants.ChangeOriginalStatusCode, DecoratorConstants.DefaultHeaders, newRequest.ToExpandoObject())
 {
 }
 public void TestConstructor()
 {
     Check.That(_decoratorResponse.StatusCode).IsEqualTo(200);
     Check.That(_decoratorResponse.Headers["Content-Type"]).IsEqualTo("application/json; charset=utf-8");
     Check.That(_decoratorResponse.Body).IsEqualTo(_newRequest.ToExpandoObject());
 }