use of com.instagram.common.json.annotation.processor.uut.GetterUUT in project ig-json-parser by Instagram.
the class SerializeTest method serializeWithGetterTest.
@Test
public void serializeWithGetterTest() throws IOException {
GetterUUT source = new GetterUUT();
source.intField = 5;
StringWriter stringWriter = new StringWriter();
JsonGenerator jsonGenerator = new JsonFactory().createGenerator(stringWriter);
GetterUUT__JsonHelper.serializeToJson(jsonGenerator, source, true);
jsonGenerator.close();
String inputString = stringWriter.toString();
GetterUUT parsed = GetterUUT__JsonHelper.parseFromJson(inputString);
assertEquals(10, parsed.intField);
}
Aggregations