use of org.hisp.dhis.android.core.data.file.AssetsFileReader in project dhis2-android-sdk by dhis2.
the class EventEndPointCallMockIntegrationShould method parseEventResponse.
private Payload<Event> parseEventResponse(String file) throws IOException {
String expectedEventsResponseJson = new AssetsFileReader().getStringFromFile(file);
ObjectMapper objectMapper = new ObjectMapper().setDateFormat(BaseIdentifiableObject.DATE_FORMAT.raw());
return objectMapper.readValue(expectedEventsResponseJson, new TypeReference<Payload<Event>>() {
});
}
Aggregations