public void NotAllFieldsReceived()
        {
            var serializer = new RestClientSerializer();

            var json = "{\"string\":\"Hello\"}";

            var result = serializer.Deserialize <StandardTypesTestData>(json);

            var expected = new StandardTypesTestData()
            {
                String = "Hello"
            };

            result.Should().BeEquivalentTo(expected);
        }
        public void NullValue()
        {
            var serializer = new RestClientSerializer();

            var obj = new StandardTypesTestData()
            {
                Integer  = 5,
                String   = null,
                Decimal  = 123.45m,
                DateTime = new DateTime(2004, 02, 03, 14, 22, 04)
            };
            var result = JToken.Parse(serializer.Serialize <StandardTypesTestData>(obj));

            var expectedJson = JToken.Parse("{\"integer\":5,\"decimal\":123.45,\"dateTime\":\"2004-02-03T14:22:04\"}");

            result.Should().BeEquivalentTo(expectedJson);
        }
        public void StandardTypes()
        {
            var serializer = new RestClientSerializer();

            var json = "{\"integer\":5,\"string\":\"Hello\", \"decimal\":123.45,\"dateTime\":\"2004-02-03T14:22:04\"}";

            var result = serializer.Deserialize <StandardTypesTestData>(json);

            var expected = new StandardTypesTestData()
            {
                Integer  = 5,
                String   = "Hello",
                Decimal  = 123.45m,
                DateTime = new DateTime(2004, 02, 03, 14, 22, 04)
            };

            result.Should().BeEquivalentTo(expected);
        }