use of com.instagram.common.json.annotation.processor.uut.ImportsUUT in project ig-json-parser by Instagram.
the class DeserializeTest method importsTest.
@Test
public void importsTest() throws IOException, JSONException {
final String encodedValue = "test";
final String deserializedValue = ":test";
StringWriter stringWriter = new StringWriter();
JSONWriter writer = new JSONWriter(stringWriter);
writer.object().key("string_field").value(encodedValue).endObject();
String inputString = stringWriter.toString();
JsonParser jp = new JsonFactory().createParser(inputString);
jp.nextToken();
ImportsUUT uut = ImportsUUT__JsonHelper.parseFromJson(jp);
assertEquals(deserializedValue, uut.mStringField);
}
Aggregations