コード例 #1
0
 @Test
 public void associateRoute() {
   createApplicationRoute()
       .then(response -> this.applicationId)
       .then(
           applicationId ->
               this.cloudFoundryClient
                   .applicationsV2()
                   .listRoutes(
                       ListApplicationRoutesRequest.builder().applicationId(applicationId).build())
                   .map(ResourceUtils::getResources))
       .subscribe(testSubscriber().assertCount(1));
 }
コード例 #2
0
 @Test
 public void listRoutesFilterByPort() {
   createApplicationRoute()
       .and(this.applicationId)
       .then(
           function(
               (routeResponse, applicationId) ->
                   this.cloudFoundryClient
                       .applicationsV2()
                       .listRoutes(
                           ListApplicationRoutesRequest.builder()
                               .applicationId(applicationId)
                               .port(routeResponse.getEntity().getPort())
                               .build())
                       .map(ResourceUtils::getResources)))
       .subscribe(testSubscriber().assertCount(1));
 }