use of io.atlasmap.v2.Audits in project atlasmap by atlasmap.
the class AtlasMappingBaseTest method printAudit.
protected String printAudit(AtlasSession session) {
StringBuilder buf = new StringBuilder("Audits: ");
for (Audit a : session.getAudits().getAudit()) {
buf.append('[');
buf.append(a.getStatus());
buf.append(", message=");
buf.append(a.getMessage());
buf.append(", path=");
buf.append(a.getPath());
buf.append("], ");
}
return buf.toString();
}
use of io.atlasmap.v2.Audits in project atlasmap by atlasmap.
the class XmlFieldReaderTest method readFromFile.
private AtlasInternalSession readFromFile(String fieldPath, FieldType fieldType, Path path) throws Exception {
String input = new String(Files.readAllBytes(path));
reader.setDocument(input, false);
XmlField xmlField = AtlasXmlModelFactory.createXmlField();
xmlField.setPath(fieldPath);
xmlField.setPrimitive(Boolean.TRUE);
xmlField.setFieldType(fieldType);
assertNull(xmlField.getValue());
AtlasInternalSession session = mock(AtlasInternalSession.class);
when(session.head()).thenReturn(mock(Head.class));
when(session.head().getSourceField()).thenReturn(xmlField);
Audits audits = new Audits();
when(session.getAudits()).thenReturn(audits);
reader.read(session);
return session;
}
use of io.atlasmap.v2.Audits in project atlasmap by atlasmap.
the class BaseDefaultAtlasContextTest method printAudit.
protected String printAudit(AtlasSession session) {
StringBuilder buf = new StringBuilder("Audits: ");
for (Audit a : session.getAudits().getAudit()) {
buf.append('[');
buf.append(a.getStatus());
buf.append(", message=");
buf.append(a.getMessage());
buf.append("], ");
}
return buf.toString();
}
use of io.atlasmap.v2.Audits in project atlasmap by atlasmap.
the class JsonFieldReaderTest method read.
private AtlasInternalSession read(JsonField field) throws AtlasException {
AtlasInternalSession session = mock(AtlasInternalSession.class);
when(session.head()).thenReturn(mock(Head.class));
when(session.head().getSourceField()).thenReturn(field);
Audits audits = new Audits();
when(session.getAudits()).thenReturn(audits);
reader.read(session);
return session;
}
use of io.atlasmap.v2.Audits in project atlasmap by atlasmap.
the class TestHelper method printAudit.
public static String printAudit(AtlasSession session) {
StringBuilder buf = new StringBuilder("Audits: ");
for (Audit a : session.getAudits().getAudit()) {
buf.append('[');
buf.append(a.getStatus());
buf.append(", message=");
buf.append(a.getMessage());
buf.append("], ");
}
return buf.toString();
}
Aggregations