コード例 #1
0
        public void FromJson_UTF8_CorrectCase()
        {
            //arrange
            var customClass = new CustomStringClass();

            //act
            new JsonConverter().FromJson(customClass, Encoding.UTF8.GetBytes("{\"Property\":\"UPERCASE\"}"));

            //assert
            Assert.That(customClass.Property, Is.EqualTo("upercase"));
        }
コード例 #2
0
        public void FromJson_CorrectDateTime()
        {
            //arrange
            var customClass = new CustomStringClass();

            //act
            new JsonConverter().FromJson(customClass, "{\"DateTime\":\"UPERCASE\"}");

            //assert
            Assert.That(customClass.Property, Is.EqualTo("upercase"));
        }