@Test public void testselectWhenNotDatabaseOneSubnetThenReturnsIt() { List<CloudSubnet> subnets = new SubnetBuilder().withPrivateSubnet().build(); SubnetSelectionResult subnetSelectionResult = underTest.select(subnets, SubnetSelectionParameters.builder().build()); assertEquals(1, subnetSelectionResult.getResult().size()); }
public SubnetSelectionResult select(Collection<CloudSubnet> subnetMetas, SubnetSelectionParameters subnetSelectionParameters) { Optional<String> errorMessage = quickValidate(subnetMetas, subnetSelectionParameters); if (errorMessage.isPresent()) { LOGGER.debug("{}", errorMessage.get()); return new SubnetSelectionResult(errorMessage.get()); } LOGGER.debug("Azure selected subnets: '{}'", String.join(", ", subnetMetas.stream().toString())); return new SubnetSelectionResult(subnetMetas.stream().collect(Collectors.toList())); }
AzureSubnetSelectorService { public SubnetSelectionResult select(Collection<CloudSubnet> subnetMetas, SubnetSelectionParameters subnetSelectionParameters) { Optional<String> errorMessage = quickValidate(subnetMetas, subnetSelectionParameters); if (errorMessage.isPresent()) { LOGGER.debug("{}", errorMessage.get()); return new SubnetSelectionResult(errorMessage.get()); } LOGGER.debug("Azure selected subnets: '{}'", String.join(", ", subnetMetas.stream().toString())); return new SubnetSelectionResult(subnetMetas.stream().collect(Collectors.toList())); } }
AzureSubnetSelectorService { public SubnetSelectionResult select(Collection<CloudSubnet> subnetMetas, SubnetSelectionParameters subnetSelectionParameters) { Optional<String> errorMessage = quickValidate(subnetMetas, subnetSelectionParameters); if (errorMessage.isPresent()) { LOGGER.debug("{}", errorMessage.get()); return new SubnetSelectionResult(errorMessage.get()); } LOGGER.debug("Azure selected subnets: '{}'", String.join(", ", subnetMetas.stream().toString())); return new SubnetSelectionResult(subnetMetas.stream().collect(Collectors.toList())); }  }
AzureSubnetSelectorService { public SubnetSelectionResult select(Collection<CloudSubnet> subnetMetas, SubnetSelectionParameters subnetSelectionParameters) { Optional<String> errorMessage = quickValidate(subnetMetas, subnetSelectionParameters); if (errorMessage.isPresent()) { LOGGER.debug("{}", errorMessage.get()); return new SubnetSelectionResult(errorMessage.get()); } LOGGER.debug("Azure selected subnets: '{}'", String.join(", ", subnetMetas.stream().toString())); return new SubnetSelectionResult(subnetMetas.stream().collect(Collectors.toList())); }  SubnetSelectionResult select(Collection<CloudSubnet> subnetMetas, SubnetSelectionParameters subnetSelectionParameters); }
AzureSubnetSelectorService { public SubnetSelectionResult select(Collection<CloudSubnet> subnetMetas, SubnetSelectionParameters subnetSelectionParameters) { Optional<String> errorMessage = quickValidate(subnetMetas, subnetSelectionParameters); if (errorMessage.isPresent()) { LOGGER.debug("{}", errorMessage.get()); return new SubnetSelectionResult(errorMessage.get()); } LOGGER.debug("Azure selected subnets: '{}'", String.join(", ", subnetMetas.stream().toString())); return new SubnetSelectionResult(subnetMetas.stream().collect(Collectors.toList())); }  SubnetSelectionResult select(Collection<CloudSubnet> subnetMetas, SubnetSelectionParameters subnetSelectionParameters);  }