Examples of MockDataSource


Examples of com.taobao.tddl.common.mockdatasource.MockDataSource

    public void test_autocommit() {
        MockDataSource.clearTrace();
        TGroupDataSource tgds = new TGroupDataSource();
        tgds.setDbGroupKey("dbKey0");
        List<DataSourceWrapper> dataSourceWrappers = new ArrayList<DataSourceWrapper>();
        MockDataSource db1 = new MockDataSource("db", "db1");
        MockDataSource db2 = new MockDataSource("db", "db2");
        DataSourceWrapper dsw1 = new DataSourceWrapper("db1", "w", db1, DBType.MYSQL);
        DataSourceWrapper dsw2 = new DataSourceWrapper("db2", "r", db2, DBType.MYSQL);
        dataSourceWrappers.add(dsw1);
        dataSourceWrappers.add(dsw2);
        tgds.init(dataSourceWrappers);
View Full Code Here

Examples of com.taobao.tddl.common.mockdatasource.MockDataSource

  public void test_no_trans() {
        MockDataSource.clearTrace();
    TGroupDataSource tgds = new TGroupDataSource();
    tgds.setDbGroupKey("dbKey0");
    List<DataSourceWrapper> dataSourceWrappers = new ArrayList<DataSourceWrapper>();
    MockDataSource db1 = new MockDataSource("db", "db1");
    MockDataSource db2 = new MockDataSource("db", "db2");
    DataSourceWrapper dsw1 = new DataSourceWrapper("db1", "w", db1, DBType.MYSQL);
    DataSourceWrapper dsw2 = new DataSourceWrapper("db2", "r", db2, DBType.MYSQL);
    dataSourceWrappers.add(dsw1);
    dataSourceWrappers.add(dsw2);
    tgds.init(dataSourceWrappers);
View Full Code Here

Examples of com.taobao.tddl.common.mockdatasource.MockDataSource

    public void test_write_trans() {
        MockDataSource.clearTrace();
        TGroupDataSource tgds = new TGroupDataSource();
        tgds.setDbGroupKey("dbKey0");
        List<DataSourceWrapper> dataSourceWrappers = new ArrayList<DataSourceWrapper>();
        MockDataSource db1 = new MockDataSource("db", "db1");
        MockDataSource db2 = new MockDataSource("db", "db2");
        DataSourceWrapper dsw1 = new DataSourceWrapper("db1", "w", db1, DBType.MYSQL);
        DataSourceWrapper dsw2 = new DataSourceWrapper("db2", "r", db2, DBType.MYSQL);
        dataSourceWrappers.add(dsw1);
        dataSourceWrappers.add(dsw2);
        tgds.init(dataSourceWrappers);
View Full Code Here

Examples of com.taobao.tddl.common.mockdatasource.MockDataSource

    public void test_read_trans() {
        MockDataSource.clearTrace();
        TGroupDataSource tgds = new TGroupDataSource();
        tgds.setDbGroupKey("dbKey0");
        List<DataSourceWrapper> dataSourceWrappers = new ArrayList<DataSourceWrapper>();
        MockDataSource db1 = new MockDataSource("db", "db1");
        MockDataSource db2 = new MockDataSource("db", "db2");
        DataSourceWrapper dsw1 = new DataSourceWrapper("db1", "w", db1, DBType.MYSQL);
        DataSourceWrapper dsw2 = new DataSourceWrapper("db2", "r", db2, DBType.MYSQL);
        dataSourceWrappers.add(dsw1);
        dataSourceWrappers.add(dsw2);
        tgds.init(dataSourceWrappers);
View Full Code Here

Examples of jimm.datavision.test.mock.source.MockDataSource

    super(name);
}

public void setUp() throws Exception {
    report = new Report();
    report.setDataSource(new MockDataSource(report));
    report.read(EXAMPLE_REPORT);
    report.setParameterXMLInput(PARAM_INPUT_FILE);
}
View Full Code Here

Examples of jimm.datavision.test.mock.source.MockDataSource

}

public void testRefersTo() {
    assertTrue(!proc.refersTo((Field)null));

    report.setDataSource(new MockDataSource(report));
    ColumnField f = (ColumnField)Field.create(null, report, null, "column",
                "jobs.title", true);
    assertTrue(!proc.refersTo(f));

    proc.getFormula().setExpression("{jobs.title}");
View Full Code Here

Examples of jimm.datavision.test.mock.source.MockDataSource

public void testReportWrite() {
    Report report = null;
    try {
  report = new Report();
  report.setDataSource(new MockDataSource(report));
  report.read(EXAMPLE_REPORT); // Must come after setting password
  report.setParameterXMLInput(PARAM_INPUT_FILE);

  File f = File.createTempFile("xml-writer-test", ".xml");
  f.deleteOnExit();
View Full Code Here

Examples of jimm.datavision.test.mock.source.MockDataSource

    super(name);
}

public void setUp() {
    report = new Report();
    report.setDataSource(new MockDataSource(report));
}
View Full Code Here

Examples of jimm.datavision.test.mock.source.MockDataSource

    super(name);
}

public void setUp() {
    report = new Report();
    report.setDataSource(new MockDataSource(report));
}
View Full Code Here

Examples of jimm.datavision.test.mock.source.MockDataSource

    dollarFormatter = new DecimalFormat("$#,###.00");
    lastColFormatter = new DecimalFormat("#,###.##");
    titleDateFormatter = new SimpleDateFormat(REPORT_DATE_FORMAT);

    report = new Report();
    report.setDataSource(new MockDataSource(report));
    reportRowNumber = officeRowNumber = postDateRowNumber = 1;

    report.read(EXAMPLE_REPORT);

    if (report.hasParameterFields())
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.