Search in sources :

Example 6 with Audits

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();
}
Also used : Audit(io.atlasmap.v2.Audit)

Example 7 with Audits

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;
}
Also used : Head(io.atlasmap.spi.AtlasInternalSession.Head) Audits(io.atlasmap.v2.Audits) AtlasInternalSession(io.atlasmap.spi.AtlasInternalSession) XmlField(io.atlasmap.xml.v2.XmlField)

Example 8 with Audits

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();
}
Also used : Audit(io.atlasmap.v2.Audit)

Example 9 with Audits

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;
}
Also used : Head(io.atlasmap.spi.AtlasInternalSession.Head) Audits(io.atlasmap.v2.Audits) AtlasInternalSession(io.atlasmap.spi.AtlasInternalSession)

Example 10 with Audits

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();
}
Also used : Audit(io.atlasmap.v2.Audit)

Aggregations

Audits (io.atlasmap.v2.Audits)9 AtlasInternalSession (io.atlasmap.spi.AtlasInternalSession)5 Head (io.atlasmap.spi.AtlasInternalSession.Head)5 Audit (io.atlasmap.v2.Audit)4 Validations (io.atlasmap.v2.Validations)3 AtlasSession (io.atlasmap.api.AtlasSession)2 AtlasMapping (io.atlasmap.v2.AtlasMapping)2 XmlField (io.atlasmap.xml.v2.XmlField)2 Test (org.junit.Test)2 AtlasContext (io.atlasmap.api.AtlasContext)1 JsonField (io.atlasmap.json.v2.JsonField)1 BaseMapping (io.atlasmap.v2.BaseMapping)1 Collection (io.atlasmap.v2.Collection)1 ConstantField (io.atlasmap.v2.ConstantField)1 Field (io.atlasmap.v2.Field)1 LookupTable (io.atlasmap.v2.LookupTable)1 Mapping (io.atlasmap.v2.Mapping)1 Mappings (io.atlasmap.v2.Mappings)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ArrayList (java.util.ArrayList)1