@Test public void testHasStartedWithError2() throws Exception { when(managementClient.testConnection()).thenReturn(METHOD_EXECUTION_OK); when(managementClient.getDeployedDrivers()).thenThrow(new Exception(METHOD_EXECUTION_FAILED)); expectedException.expectMessage(METHOD_EXECUTION_FAILED); driverProvider.hasStarted(); verify(managementClient, times(1)).testConnection(); verify(managementClient, times(1)).getDeployedDrivers(); }
@Override public void hasStarted() throws Exception { driverMgmtClient.testConnection(); driverMgmtClient.getDeployedDrivers(); }
WildflyDriverProvider implements DriverProvider { @Override public void hasStarted() throws Exception { driverMgmtClient.testConnection(); driverMgmtClient.getDeployedDrivers(); } }
WildflyDriverProvider implements DriverProvider { @Override public void hasStarted() throws Exception { driverMgmtClient.testConnection(); driverMgmtClient.getDeployedDrivers(); } WildflyDriverProvider(); @Inject  WildflyDriverProvider(MavenArtifactResolver artifactResolver); }
WildflyDriverProvider implements DriverProvider { @Override public void hasStarted() throws Exception { driverMgmtClient.testConnection(); driverMgmtClient.getDeployedDrivers(); } WildflyDriverProvider(); @Inject  WildflyDriverProvider(MavenArtifactResolver artifactResolver); DriverDeploymentInfo deploy(final DriverDef driverDef); @Override DriverDeploymentInfo resync(DriverDef driverDef,
                                       DriverDeploymentInfo deploymentInfo); @Override void undeploy(final DriverDeploymentInfo deploymentInfo); @Override DriverDeploymentInfo getDeploymentInfo(final String uuid); List< DriverDef > getDeployments(); List< DriverDeploymentInfo > getDeploymentsInfo(); @Override void loadConfig(Properties properties); @Override void hasStarted(); void setDriverMgmtClient(WildflyDriverManagementClient driverMgmtClient); }
WildflyDriverProvider implements DriverProvider { @Override public void hasStarted() throws Exception { driverMgmtClient.testConnection(); driverMgmtClient.getDeployedDrivers(); } WildflyDriverProvider(); @Inject  WildflyDriverProvider(MavenArtifactResolver artifactResolver); DriverDeploymentInfo deploy(final DriverDef driverDef); @Override DriverDeploymentInfo resync(DriverDef driverDef,
                                       DriverDeploymentInfo deploymentInfo); @Override void undeploy(final DriverDeploymentInfo deploymentInfo); @Override DriverDeploymentInfo getDeploymentInfo(final String uuid); List< DriverDef > getDeployments(); List< DriverDeploymentInfo > getDeploymentsInfo(); @Override void loadConfig(Properties properties); @Override void hasStarted(); void setDriverMgmtClient(WildflyDriverManagementClient driverMgmtClient);  }