public void TestReplaceContentTypeDeserializer()
 {
     var restClient = new RestClient();
     var deserializer = new CustomDeserializer();
     restClient.ReplaceHandler(typeof(RestSharp.Portable.Deserializers.IDeserializer), deserializer);
     Assert.AreSame(deserializer, restClient.GetHandler("application/json"));
     Assert.AreSame(deserializer, restClient.GetHandler("text/json"));
 }
示例#2
0
        public void TestReplaceContentTypeDeserializer()
        {
            var restClient   = new RestClient();
            var deserializer = new CustomDeserializer();

            restClient.ReplaceHandler(typeof(RestSharp.Portable.Deserializers.IDeserializer), deserializer);
            Assert.AreSame(deserializer, restClient.GetHandler("application/json"));
            Assert.AreSame(deserializer, restClient.GetHandler("text/json"));
        }