// TODO: the null value is not allowed per OAS document.
// The deserialization should fail.
@Test
    public void testNullValueDisallowed() throws Exception {
        {
            String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": 100, \"status\": \"placed\" }";
            org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class);
            assertEquals(100L, (long)o.getQuantity());
            assertEquals(org.openapitools.client.model.Order.StatusEnum.PLACED, o.getStatus());
        }
        {
            String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": null }";
            org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class);
            // TODO: the null value is not allowed per OAS document.
            // The deserialization should fail.
            assertNull(o.getQuantity());
        }
    }
String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": null }";
org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class);
// TODO: the null value is not allowed per OAS document.
// The deserialization should fail.
assertNull(o.getQuantity());
}
public void testNullValueDisallowed() throws Exception {
{
String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": 100, \"status\": \"placed\" }";
org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class);
assertEquals(100L, (long)o.getQuantity());
assertEquals(org.openapitools.client.model.Order.StatusEnum.PLACED, o.getStatus());
}
{
String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": null }";
org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class);
// TODO: the null value is not allowed per OAS document.
// The deserialization should fail.
assertNull(o.getQuantity());
}
}
@Test
public void testNullValueDisallowed() throws Exception {
{
String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": 100, \"status\": \"placed\" }";
org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class);
assertEquals(100L, (long)o.getQuantity());
assertEquals(org.openapitools.client.model.Order.StatusEnum.PLACED, o.getStatus());
}
{
String str = "{ \"id\": 123, \"petId\": 345, \"quantity\": null }";
org.openapitools.client.model.Order o = json.getContext(null).readValue(str, org.openapitools.client.model.Order.class);
// TODO: the null value is not allowed per OAS document.
// The deserialization should fail.
assertNull(o.getQuantity());
}
}