use of com.instagram.common.json.annotation.processor.uut.CustomParseContainerUUT in project ig-json-parser by Instagram.
the class DeserializeTest method testCustomParse.
@Test
public void testCustomParse() throws Exception {
String value = "hey there";
StringWriter stringWriter = new StringWriter();
ExtensibleJSONWriter writer = new ExtensibleJSONWriter(stringWriter);
writer.object().key(CustomParseContainerUUT.INNER_FIELD_NAME).object().key(CustomParseContainerUUT.CustomParseUUT.STRING_FIELD_NAME).value(value).endObject().endObject();
String inputString = stringWriter.toString();
JsonParser jp = new JsonFactory().createParser(inputString);
jp.nextToken();
CustomParseContainerUUT uut = CustomParseContainerUUT__JsonHelper.parseFromJson(jp);
assertEquals(value, uut.getCustomParseUUT().getStringField());
}
Aggregations