Search in sources :

Example 1 with AtlasFieldWriter

use of io.atlasmap.spi.AtlasFieldWriter in project atlasmap by atlasmap.

the class DefaultAtlasSessionTest method testGetFieldWriter.

@Test
public void testGetFieldWriter() {
    AtlasFieldWriter writer = new AtlasFieldWriter() {

        @Override
        public void write(AtlasInternalSession session) throws AtlasException {
            LOG.debug("write method");
        }
    };
    session.setFieldWriter(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID, writer);
    assertNotNull(session.getFieldWriter(null));
    assertNotNull(session.getFieldWriter(""));
    assertNotNull(session.getFieldWriter(AtlasConstants.DEFAULT_TARGET_DOCUMENT_ID));
    assertNotNull(session.getFieldWriter("", AtlasFieldWriter.class));
}
Also used : AtlasInternalSession(io.atlasmap.spi.AtlasInternalSession) AtlasFieldWriter(io.atlasmap.spi.AtlasFieldWriter) Test(org.junit.jupiter.api.Test)

Example 2 with AtlasFieldWriter

use of io.atlasmap.spi.AtlasFieldWriter in project atlasmap by atlasmap.

the class DefaultAtlasSessionTest method testSetFieldWriter.

@Test
public void testSetFieldWriter() {
    AtlasFieldWriter writer = new AtlasFieldWriter() {

        @Override
        public void write(AtlasInternalSession session) throws AtlasException {
            LOG.debug("write method");
        }
    };
    session.setFieldWriter(null, writer);
    session.setFieldWriter("", writer);
}
Also used : AtlasInternalSession(io.atlasmap.spi.AtlasInternalSession) AtlasFieldWriter(io.atlasmap.spi.AtlasFieldWriter) Test(org.junit.jupiter.api.Test)

Aggregations

AtlasFieldWriter (io.atlasmap.spi.AtlasFieldWriter)2 AtlasInternalSession (io.atlasmap.spi.AtlasInternalSession)2 Test (org.junit.jupiter.api.Test)2