List of usage examples for org.springframework.ide.eclipse.boot.dash.cloudfoundry CloudFoundryBootDashModel canDelete
@Override public boolean canDelete(BootDashElement element)
From source file:org.springframework.ide.eclipse.boot.dash.test.CloudFoundryBootDashModelIntegrationTest.java
@Test public void deleteService() throws Exception { String serviceName = services.createTestService(); CFClientParams targetParams = CfTestTargetParams.fromEnv(); CloudFoundryBootDashModel model = harness.createCfTarget(targetParams); ACondition.waitFor("service to appear", APP_IS_VISIBLE_TIMEOUT, () -> { assertNotNull(model.getService(serviceName)); });// w w w.ja v a 2s. c o m when(ui.confirmOperation(contains("Deleting"), contains("Are you sure that you want to delete"))) .thenReturn(true); CloudServiceInstanceDashElement service = model.getService(serviceName); model.canDelete(service); model.delete(ImmutableSet.of(service), ui); ACondition.waitFor("service to disapear", SERVICE_DELETE_TIMEOUT, () -> { assertNull(model.getService(serviceName)); }); }