예제 #1
0
        public void TestDeserializeNullableString2(long?expected)
        {
            var json   = TestJsonUtil.CreateSingleJsonObject(key: "value", value: expected?.ToString());
            var actual = JsonSerializer.Deserialize <NullableLongClass>(json).Value;

            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void TestDeserialize1(long expected)
        {
            // {"value": ${expected}}
            var json   = TestJsonUtil.CreateSingleJsonObject(key: "value", value: expected.ToString());
            var actual = JsonUtil.Deserialize <LongClass>(json).Value;

            Assert.Equal(expected, actual);
        }
예제 #3
0
        public void TestDeserialize2(int?expected)
        {
            // {"value": ${expected}}
            var json   = TestJsonUtil.CreateSingleJsonObject(key: "value", value: expected?.ToString());
            var actual = JsonUtil.Deserialize <NullableIntClass>(json).Value;

            Assert.Equal(expected, actual);
        }