コード例 #1
0
 @Override
 protected void assertions(TestSubscriber<SpaceDetail> testSubscriber) throws Exception {
   testSubscriber.assertEquals(
       fill(SpaceDetail.builder())
           .application("test-application-name")
           .domain("test-domain-name")
           .id(TEST_SPACE_ID)
           .name(TEST_SPACE_NAME)
           .organization("test-organization-name")
           .securityGroup("test-security-group-name")
           .service("test-service-label")
           .spaceQuota(Optional.<SpaceQuota>empty())
           .build());
 }
コード例 #2
0
  private static Mono<Optional<List<Route>>> getOptionalRoutes(
      final CloudFoundryClient cloudFoundryClient,
      boolean deleteRoutes,
      final String applicationId) {
    return Mono.just(deleteRoutes)
        .where(OperationUtils.identity())
        .then(
            new Function<Boolean, Mono<List<Route>>>() {

              @Override
              public Mono<List<Route>> apply(Boolean deleteRoutes) {
                return getRoutes(cloudFoundryClient, applicationId);
              }
            })
        .map(OptionalUtils.<List<Route>>toOptional())
        .defaultIfEmpty(Optional.<List<Route>>empty());
  }
コード例 #3
0
 private static String getBuildpack(SummaryApplicationResponse response) {
   return Optional.ofNullable(response.getBuildpack()).orElse(response.getDetectedBuildpack());
 }