<commit_before>﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace RestSharp.Portable.Test
{
    [TestClass]
    public class CustomDeserializer
    {
        class TestDeserializer : RestSharp.Portable.Deserializers.JsonDeserializer
        {
            protected override void ConfigureSerializer(Newtonsoft.Json.JsonSerializer serializer)
            {
                base.ConfigureSerializer(serializer);
                serializer.DateFormatHandling = Newtonsoft.Json.DateFormatHandling.MicrosoftDateFormat;
            }
        }

        [TestMethod]
        public void TestReplaceContentTypeDeserializer()
        {
            var restClient = new RestClient();
            var deserializer = new TestDeserializer();
            restClient.ReplaceHandler(typeof(RestSharp.Portable.Deserializers.IDeserializer), deserializer);
            Assert.AreSame(deserializer, restClient.GetHandler("application/json"));
            Assert.AreSame(deserializer, restClient.GetHandler("text/json"));
        }
    }
}<commit_msg>Fixed test: Just replace the JsonDeserializer<commit_after>﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace RestSharp.Portable.Test
{
    [TestClass]
    public class CustomDeserializer
    {
        class TestDeserializer : RestSharp.Portable.Deserializers.JsonDeserializer
        {
            protected override void ConfigureSerializer(Newtonsoft.Json.JsonSerializer serializer)
            {
                base.ConfigureSerializer(serializer);
                serializer.DateFormatHandling = Newtonsoft.Json.DateFormatHandling.MicrosoftDateFormat;
            }
        }

        [TestMethod]
        public void TestReplaceContentTypeDeserializer()
        {
            var restClient = new RestClient();
            var deserializer = new TestDeserializer();
            restClient.ReplaceHandler(typeof(RestSharp.Portable.Deserializers.JsonDeserializer), deserializer);
            Assert.AreSame(deserializer, restClient.GetHandler("application/json"));
            Assert.AreSame(deserializer, restClient.GetHandler("text/json"));
        }
    }
}
{'fraction_non_alphanumeric': 0.07957189390414146, 'fraction_numerical': 0.0, 'mean_word_length': 2.8120567375886525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1877988', 'n_tokens_mistral': 556, 'n_tokens_neox': 538, 'n_words': 83}