@Test public void restartApplication () { RestartApplicationRequest restartApplicationRequest = RestartApplicationRequest.builder() .name(APPLICATION_NAME) .build(); Mono monoVoid = mock(Mono.class); doReturn(applications).when(cloudFoundryOperations).applications(); doReturn(monoVoid).when(applications).restart(restartApplicationRequest); cloudFoundryApplicationPlatform.restartApplication(APPLICATION_NAME); verify(applications, times(1)).restart(restartApplicationRequest); verify(monoVoid, times(1)).block(); }
public void restartApplication (String applicationName) { RestartApplicationRequest restartApplicationRequest = RestartApplicationRequest.builder().name(applicationName).build(); cloudFoundryOperations.applications().restart(restartApplicationRequest).block(); }
CloudFoundryApplicationPlatform extends CloudFoundryPlatform { public void restartApplication (String applicationName) { RestartApplicationRequest restartApplicationRequest = RestartApplicationRequest.builder().name(applicationName).build(); cloudFoundryOperations.applications().restart(restartApplicationRequest).block(); } }
CloudFoundryApplicationPlatform extends CloudFoundryPlatform { public void restartApplication (String applicationName) { RestartApplicationRequest restartApplicationRequest = RestartApplicationRequest.builder().name(applicationName).build(); cloudFoundryOperations.applications().restart(restartApplicationRequest).block(); } @Autowired  CloudFoundryApplicationPlatform(); }
CloudFoundryApplicationPlatform extends CloudFoundryPlatform { public void restartApplication (String applicationName) { RestartApplicationRequest restartApplicationRequest = RestartApplicationRequest.builder().name(applicationName).build(); cloudFoundryOperations.applications().restart(restartApplicationRequest).block(); } @Autowired  CloudFoundryApplicationPlatform(); ContainerHealth checkPlatformHealth(); @Override List<Container> generateRoster(); @Override boolean isContainerRecycled(Container container); void rescaleApplication(String applicationName, int instances); void restartApplication(String applicationName); void unmapRoute(UnmapRouteRequest unmapRouteRequest); void mapRoute(MapRouteRequest mapRouteRequest); }
CloudFoundryApplicationPlatform extends CloudFoundryPlatform { public void restartApplication (String applicationName) { RestartApplicationRequest restartApplicationRequest = RestartApplicationRequest.builder().name(applicationName).build(); cloudFoundryOperations.applications().restart(restartApplicationRequest).block(); } @Autowired  CloudFoundryApplicationPlatform(); ContainerHealth checkPlatformHealth(); @Override List<Container> generateRoster(); @Override boolean isContainerRecycled(Container container); void rescaleApplication(String applicationName, int instances); void restartApplication(String applicationName); void unmapRoute(UnmapRouteRequest unmapRouteRequest); void mapRoute(MapRouteRequest mapRouteRequest);  }