@Test public void testMultipleSubnetCidrNull() { when(network.getParameter(VPC_CIDRS, List.class)).thenReturn(null); when(network.getStringParameter(VPC_CIDR)).thenReturn("1.1.1.1"); assertTrue(underTest.getExistingVpcCidrs().contains("1.1.1.1")); }
public List<String> getExistingVpcCidrs() { List<String> cidrs = network.getParameter(VPC_CIDRS, List.class); if (cidrs == null || cidrs.isEmpty()) { return List.of(getExistingVpcCidr()); } return cidrs; }
AwsNetworkView { public List<String> getExistingVpcCidrs() { List<String> cidrs = network.getParameter(VPC_CIDRS, List.class); if (cidrs == null || cidrs.isEmpty()) { return List.of(getExistingVpcCidr()); } return cidrs; } }
AwsNetworkView { public List<String> getExistingVpcCidrs() { List<String> cidrs = network.getParameter(VPC_CIDRS, List.class); if (cidrs == null || cidrs.isEmpty()) { return List.of(getExistingVpcCidr()); } return cidrs; } AwsNetworkView(Network network); }
AwsNetworkView { public List<String> getExistingVpcCidrs() { List<String> cidrs = network.getParameter(VPC_CIDRS, List.class); if (cidrs == null || cidrs.isEmpty()) { return List.of(getExistingVpcCidr()); } return cidrs; } AwsNetworkView(Network network); boolean isExistingVPC(); boolean isExistingSubnet(); boolean isExistingIGW(); String getExistingSubnet(); boolean isSubnetList(); List<String> getSubnetList(); String getExistingIgw(); String getExistingVpc(); String getExistingVpcCidr(); List<String> getExistingVpcCidrs(); }
AwsNetworkView { public List<String> getExistingVpcCidrs() { List<String> cidrs = network.getParameter(VPC_CIDRS, List.class); if (cidrs == null || cidrs.isEmpty()) { return List.of(getExistingVpcCidr()); } return cidrs; } AwsNetworkView(Network network); boolean isExistingVPC(); boolean isExistingSubnet(); boolean isExistingIGW(); String getExistingSubnet(); boolean isSubnetList(); List<String> getSubnetList(); String getExistingIgw(); String getExistingVpc(); String getExistingVpcCidr(); List<String> getExistingVpcCidrs(); static final String VPC_ID; static final String REGION; }