use of com.instagram.common.json.annotation.processor.uut.PostprocessingUUT in project ig-json-parser by Instagram.
the class DeserializeTest method postprocessTest.
@Test
public void postprocessTest() throws IOException, JSONException {
final int value = 25;
StringWriter stringWriter = new StringWriter();
JSONWriter writer = new JSONWriter(stringWriter);
writer.object().key(PostprocessingUUT.FIELD_NAME).value(value).endObject();
String inputString = stringWriter.toString();
JsonParser jp = new JsonFactory().createParser(inputString);
jp.nextToken();
PostprocessingUUT uut = PostprocessingUUT__JsonHelper.parseFromJson(jp);
assertSame(value + 1, uut.getValue());
}
Aggregations