Merge pull request #7438 from amit2103/BAEL-16045-11
[BAEL-16045] - Check Article Code Matches GitHub for https://www.bael…
This commit is contained in:
@@ -5,7 +5,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||||
|
|
||||||
public class ProductJsonAnySetter {
|
public class Product {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private String category;
|
private String category;
|
||||||
@@ -59,7 +59,7 @@ public class DynamicObjectDeserializationUnitTest {
|
|||||||
String json = readResource("/deserialize-dynamic-object/flat.json");
|
String json = readResource("/deserialize-dynamic-object/flat.json");
|
||||||
|
|
||||||
// when
|
// when
|
||||||
ProductJsonAnySetter product = objectMapper.readValue(json, ProductJsonAnySetter.class);
|
Product product = objectMapper.readValue(json, Product.class);
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assertThat(product.getName()).isEqualTo("Pear yPhone 72");
|
assertThat(product.getName()).isEqualTo("Pear yPhone 72");
|
||||||
|
|||||||
Reference in New Issue
Block a user