use of org.jenkins.plugins.audit2db.DbAuditPublisherDescriptor in project selenium_java by sergueik.
the class WhenTestingDataSource method testInvalidJdbcDriverShouldFail.
@Test
public void testInvalidJdbcDriverShouldFail() throws Exception {
final DbAuditPublisher publisher = new DbAuditPublisherImpl();
final DbAuditPublisherDescriptor descriptor = (DbAuditPublisherDescriptor) publisher.getDescriptor();
final FormValidation testResult = descriptor.doTestJdbcConnection("WrongDriver", jdbcUrl, jdbcUser, jdbcPassword);
Assert.assertEquals("Unexpected successful connection.", FormValidation.Kind.ERROR, testResult.kind);
}
use of org.jenkins.plugins.audit2db.DbAuditPublisherDescriptor in project selenium_java by sergueik.
the class WhenSchedulingJob method getPlugin.
private DbAuditPublisher getPlugin() {
final DbAuditPublisher publisher = new DbAuditPublisherImpl();
final DbAuditPublisherDescriptor descriptor = (DbAuditPublisherDescriptor) publisher.getDescriptor();
descriptor.setJdbcDriver(jdbcDriver);
descriptor.setJdbcUrl(jdbcUrl);
descriptor.setJdbcUser(jdbcUser);
descriptor.setJdbcPassword(jdbcPassword);
return publisher;
}
use of org.jenkins.plugins.audit2db.DbAuditPublisherDescriptor in project selenium_java by sergueik.
the class WhenTestingDataSource method testGeneratingDdlWithValidJdbcDetailsShouldSucceed.
@Test
public void testGeneratingDdlWithValidJdbcDetailsShouldSucceed() throws Exception {
final DbAuditPublisher publisher = new DbAuditPublisherImpl();
final DbAuditPublisherDescriptor descriptor = (DbAuditPublisherDescriptor) publisher.getDescriptor();
final FormValidation testResult = descriptor.doGenerateDdl(jdbcDriver, jdbcUrl, jdbcUser, jdbcPassword);
Assert.assertEquals("Unexpected connection error.", FormValidation.Kind.OK, testResult.kind);
}
use of org.jenkins.plugins.audit2db.DbAuditPublisherDescriptor in project selenium_java by sergueik.
the class WhenTestingDataSource method testValidJdbcDatasourceShouldSucceed.
@Test
public void testValidJdbcDatasourceShouldSucceed() throws Exception {
final DbAuditPublisher publisher = new DbAuditPublisherImpl();
final DbAuditPublisherDescriptor descriptor = (DbAuditPublisherDescriptor) publisher.getDescriptor();
final FormValidation testResult = descriptor.doTestJdbcConnection(jdbcDriver, jdbcUrl, jdbcUser, jdbcPassword);
Assert.assertEquals("Unexpected connection error.", FormValidation.Kind.OK, testResult.kind);
}
Aggregations