Skip to content

Commit

Permalink
add more tests for oneOf
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Dec 8, 2021
1 parent a489a2e commit eb973df
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ public void testOneOfSchemaWithoutDiscriminator() throws Exception {
assertTrue(o.getActualInstance() instanceof BananaReq);
BananaReq inst = (BananaReq) o.getActualInstance();
assertEquals(inst.getLengthCm(), new java.math.BigDecimal(17));
assertEquals(json.getGson().toJson(o), "{\"lengthCm\":17}");
assertEquals(json.getGson().toJson(inst), "{\"lengthCm\":17}");
}
{
// Try to deserialize empty object. This should fail 'oneOf' because none will match
Expand Down

0 comments on commit eb973df

Please sign in to comment.