Search in sources :

Example 1 with SimpleRouterContext

use of org.jumpmind.symmetric.route.SimpleRouterContext in project symmetric-ds by JumpMind.

the class XmlPublisherDataRouterTest method setUp.

@Before
public void setUp() {
    ISymmetricEngine engine = mock(ISymmetricEngine.class);
    when(engine.getSymmetricDialect()).thenReturn(mock(AbstractSymmetricDialect.class));
    when(engine.getSymmetricDialect().getBinaryEncoding()).thenReturn(BinaryEncoding.BASE64);
    table = Table.buildTable(TABLE_NAME, new String[] { "ID" }, new String[] { "ID", "DATA" });
    context = new SimpleRouterContext();
    router = new XmlPublisherDataRouter();
    router.setSymmetricEngine(engine);
    router.setTimeStringGenerator(new XmlPublisherDatabaseWriterFilter.ITimeGenerator() {

        public String getTime() {
            return "test";
        }
    });
    List<String> groupByColumnNames = new ArrayList<String>();
    groupByColumnNames.add("ID");
    router.setGroupByColumnNames(groupByColumnNames);
    output = new Output();
    router.setPublisher(output);
}
Also used : ArrayList(java.util.ArrayList) ISymmetricEngine(org.jumpmind.symmetric.ISymmetricEngine) AbstractSymmetricDialect(org.jumpmind.symmetric.db.AbstractSymmetricDialect) SimpleRouterContext(org.jumpmind.symmetric.route.SimpleRouterContext) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)1 ISymmetricEngine (org.jumpmind.symmetric.ISymmetricEngine)1 AbstractSymmetricDialect (org.jumpmind.symmetric.db.AbstractSymmetricDialect)1 SimpleRouterContext (org.jumpmind.symmetric.route.SimpleRouterContext)1 Before (org.junit.Before)1