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); }
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); }
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); }