use of com.instagram.common.json.annotation.processor.uut.AlternateFieldUUT in project ig-json-parser by Instagram.
the class DeserializeTest method testAlternateFieldNameHelper.
private void testAlternateFieldNameHelper(String fieldName, String value) throws Exception {
StringWriter stringWriter = new StringWriter();
ExtensibleJSONWriter writer = new ExtensibleJSONWriter(stringWriter);
writer.object().key(fieldName).value(value).endObject();
String inputString = stringWriter.toString();
JsonParser jp = new JsonFactory().createParser(inputString);
jp.nextToken();
AlternateFieldUUT uut = AlternateFieldUUT__JsonHelper.parseFromJson(jp);
assertEquals(value, uut.getNameField());
}
Aggregations