Package utils

Examples of utils.TestDatabase.stop()


            Assert.assertEquals(2, result.size());
        } catch (Exception e) {
            e.printStackTrace();
            Assert.fail();
        } finally {
            testDatabase.stop();
        }
    }


    @Test
View Full Code Here


            Assert.assertEquals(2, result.size());
        } catch (Exception e) {
            e.printStackTrace();
            Assert.fail();
        } finally {
            testDatabase.stop();
        }


    }
View Full Code Here

            Assert.assertEquals(0, result.size());
        } catch (Exception e) {
            e.printStackTrace();
            Assert.fail();
        } finally {
            testDatabase.stop();
        }
    }

    private void printResult(List<Map<String, Object>> result) {
        for (Map<String, Object> stringObjectMap : result) {
View Full Code Here

        ReportOutputDocument reportOutputDocument = reporting.runReport(new RunParams(report).templateCode("XLS"), new FileOutputStream("./result/smoke/result.xls"));

        Assert.assertEquals("myFileName.xls", reportOutputDocument.getDocumentName());

        testDatabase.stop();
    }

    private Report createReport() throws IOException {
        ReportBuilder report = new ReportBuilder()
                .band(new BandBuilder()
View Full Code Here

        ReportOutputDocument reportOutputDocument = reporting.runReport(new RunParams(report), new FileOutputStream("./result/smoke/result.custom"));

        Assert.assertEquals("myFileName.txt", reportOutputDocument.getDocumentName());

        testDatabase.stop();
    }

    private Report createReport() throws IOException {
        ReportBuilder report = new ReportBuilder()
                .band(new BandBuilder()
View Full Code Here

                .setGroovyDataLoader(new GroovyDataLoader(new DefaultScriptingImpl()))
                .setSqlDataLoader(new SqlDataLoader(testDatabase.getDs())));

        ReportOutputDocument reportOutputDocument = reporting.runReport(new RunParams(report), new FileOutputStream("./result/sample/bookstore.xls"));

        testDatabase.stop();
    }
}
View Full Code Here

        } catch (Exception e) {
            e.printStackTrace();
            Assert.fail();
        }

        testDatabase.stop();
    }

    @Test
    public void testCaseSensitiveSqlLoader() throws Exception {
        TestDatabase testDatabase = new TestDatabase();
View Full Code Here

        } catch (Exception e) {
            e.printStackTrace();
            Assert.fail();
        }

        testDatabase.stop();
    }

    private void printResult(List<Map<String, Object>> result) {
        for (Map<String, Object> stringObjectMap : result) {
            for (Map.Entry<String, Object> entry : stringObjectMap.entrySet()) {
View Full Code Here

                .setGroovyDataLoader(new GroovyDataLoader(new DefaultScriptingImpl()))
                .setSqlDataLoader(new SqlDataLoader(testDatabase.getDs())));

        ReportOutputDocument reportOutputDocument = reporting.runReport(new RunParams(report), new FileOutputStream("./result/sample/breakdown.xls"));

        testDatabase.stop();
    }
}
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.