Ejemplo n.º 1
0
 public void Can_deserialize_to_dynamic_single()
 {
     var serializer = new DefaultJsonSerializer();
     var response = new RestResponse<dynamic>();
     response.SetContent(SingleInput);
     var proxy = serializer.DeserializeDynamic(response);
     Assert.IsNotNull(proxy);
 }
Ejemplo n.º 2
0
 public void Can_deserialize_to_dynamic_collection()
 {
     var serializer = new DefaultJsonSerializer();
     var response = new RestResponse<JsonObject>();
     response.SetContent(DoubleInput);
     var proxy = serializer.DeserializeDynamic(response);
     Assert.IsNotNull(proxy);
 }
Ejemplo n.º 3
0
        public void Can_deserialize_to_dynamic_single()
        {
            var serializer = new DefaultJsonSerializer();
            var response   = new RestResponse <JsonObject>();

            response.SetContent(SingleInput);
            var proxy = serializer.DeserializeDynamic(response);

            Assert.IsNotNull(proxy);
        }
Ejemplo n.º 4
0
        public void Can_deserialize_all_test_cases()
        {
            var serializer = new DefaultJsonSerializer();
            var files = Directory.GetFiles("Json", "*.json");
            foreach(var file in files)
            {
                var json = File.ReadAllText(file);
                var response = new RestResponse<dynamic>();
                response.SetContent(json);

                var proxy = serializer.DeserializeDynamic(response);
                Assert.IsNotNull(proxy);
            }
        }
Ejemplo n.º 5
0
        public void Can_deserialize_all_test_cases()
        {
            var serializer = new DefaultJsonSerializer();
            var files      = Directory.GetFiles("Json", "*.json");

            foreach (var file in files)
            {
                var json     = File.ReadAllText(file);
                var response = new RestResponse <JsonObject>();
                response.SetContent(json);

                var proxy = serializer.DeserializeDynamic(response);
                Assert.IsNotNull(proxy);
            }
        }
Ejemplo n.º 6
0
 public override dynamic DeserializeDynamic <T>(RestResponse <T> response)
 {
     return(_dynamicDeserializer.DeserializeDynamic(response));
 }