use of org.pentaho.di.core.logging.LoggingObjectInterface in project pentaho-kettle by pentaho.
the class KettleReportBuilderTest method createReport.
@Test
public void createReport() throws Exception {
LoggingObjectInterface log = mock(LoggingObjectInterface.class);
AutoDocOptionsInterface options = mock(AutoDocOptionsInterface.class);
when(options.isIncludingImage()).thenReturn(Boolean.TRUE);
KettleReportBuilder builder = new KettleReportBuilder(log, Collections.<ReportSubjectLocation>emptyList(), "", options);
builder.createReport();
assertNotNull(builder.getReport());
assertNotNull(builder.getReport().getDataFactory());
assertNotNull(builder.getReport().getReportHeader());
assertNotNull(builder.getReport().getReportFooter());
assertNotNull(builder.getReport().getRootGroup());
assertNotNull(builder.getReport().getPageDefinition());
assertTrue(builder.getReport().getExpressions().size() > 0);
}
use of org.pentaho.di.core.logging.LoggingObjectInterface in project pentaho-kettle by pentaho.
the class JobTrackerExecution method setUpBeforeClass.
@Before
public void setUpBeforeClass() throws Exception {
KettleEnvironment.init();
LoggingObjectInterface log = new SimpleLoggingObject("junit", LoggingObjectType.GENERAL, null);
File file = File.createTempFile(JobTrackerExecution.class.getSimpleName(), "");
file.deleteOnExit();
DatabaseMeta databaseMeta = new DatabaseMeta(NAME, "Hypersonic", "JDBC", null, "mem:HSQLDB-JUNIT-LOGJOB", null, null, null);
Database logDataBase = new Database(log, databaseMeta);
logDataBase.connect();
// run sql create for database
InputStream input = JobTrackerExecution.class.getClassLoader().getResourceAsStream(PKG + CREATE);
String sql = getStringFromInput(input);
logDataBase.execStatements(sql);
logDataBase.commit(true);
logDataBase.disconnect();
}
Aggregations