Package org.springframework.xd.test.fixtures

Examples of org.springframework.xd.test.fixtures.JdbcSource.query()


    String streamname = generateStreamName().replace("-", "_");

    jdbcSource.getJdbcTemplate().update(String.format("create table %s (seen INT, name VARCHAR(32))", streamname));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
    jdbcSource.query(String.format("SELECT * FROM %s", streamname));

    stream().create(streamname, "%s | %s", jdbcSource, counter);
    assertThat(counter, XDMatchers.eventually(XDMatchers.hasValue("2")));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
    assertThat(counter, XDMatchers.eventually(XDMatchers.hasValue("" + (2 + 3))));
View Full Code Here


    String streamname = generateStreamName().replace("-", "_");

    jdbcSource.getJdbcTemplate().update(String.format("create table %s (seen INT, name VARCHAR(32))", streamname));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
    jdbcSource.query(String.format("select * from %s where seen = 0", streamname));
    jdbcSource.update(String.format("update %s set seen = 1 where seen = 0", streamname));

    stream().create(streamname, "%s | %s", jdbcSource, counter);
    assertThat(counter, XDMatchers.eventually(XDMatchers.hasValue("2")));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.