Search in sources :

Example 1 with AtlasFieldReader

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

the class DefaultAtlasSessionTest method testGetFieldReader.

@Test
public void testGetFieldReader() {
    AtlasFieldReader reader = new AtlasFieldReader() {

        @Override
        public void read(AtlasInternalSession session) throws AtlasException {
            LOG.debug("read method");
        }
    };
    session.setFieldReader(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID, reader);
    assertNotNull(session.getFieldReader(null));
    assertNotNull(session.getFieldReader(""));
    assertNotNull(session.getFieldReader(AtlasConstants.DEFAULT_SOURCE_DOCUMENT_ID));
    assertNotNull(session.getFieldReader("", AtlasFieldReader.class));
}
Also used : AtlasInternalSession(io.atlasmap.spi.AtlasInternalSession) AtlasFieldReader(io.atlasmap.spi.AtlasFieldReader) Test(org.junit.Test)

Example 2 with AtlasFieldReader

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

the class DefaultAtlasSessionTest method testSetFieldReader.

@Test
public void testSetFieldReader() {
    AtlasFieldReader reader = new AtlasFieldReader() {

        @Override
        public void read(AtlasInternalSession session) throws AtlasException {
            LOG.debug("read method");
        }
    };
    session.setFieldReader(null, reader);
    session.setFieldReader("", reader);
}
Also used : AtlasInternalSession(io.atlasmap.spi.AtlasInternalSession) AtlasFieldReader(io.atlasmap.spi.AtlasFieldReader) Test(org.junit.Test)

Aggregations

AtlasFieldReader (io.atlasmap.spi.AtlasFieldReader)2 AtlasInternalSession (io.atlasmap.spi.AtlasInternalSession)2 Test (org.junit.Test)2