@Test void testConvertToNetwork() { EnvironmentView environment = new EnvironmentView(); environment.setLocation(LOCATION); AwsNetwork awsNetwork = new AwsNetwork(); awsNetwork.setVpcId(VPC_ID); awsNetwork.setEnvironments(Set.of(environment)); Network network = underTest.convertToNetwork(awsNetwork); assertEquals(VPC_ID, network.getStringParameter(AwsNetworkView.VPC_ID)); }
@Override public Network convertToNetwork(BaseNetwork baseNetwork) { AwsNetwork awsNetwork = (AwsNetwork) baseNetwork; Map<String, Object> param = new HashMap<>(); param.put(AwsNetworkView.VPC_ID, awsNetwork.getVpcId()); param.put(AwsNetworkView.REGION, awsNetwork.getEnvironments().stream().findFirst().get().getLocation()); return new Network(null, param); }
AwsEnvironmentNetworkConverter extends EnvironmentBaseNetworkConverter { @Override public Network convertToNetwork(BaseNetwork baseNetwork) { AwsNetwork awsNetwork = (AwsNetwork) baseNetwork; Map<String, Object> param = new HashMap<>(); param.put(AwsNetworkView.VPC_ID, awsNetwork.getVpcId()); param.put(AwsNetworkView.REGION, awsNetwork.getEnvironments().stream().findFirst().get().getLocation()); return new Network(null, param); } }
AwsEnvironmentNetworkConverter extends EnvironmentBaseNetworkConverter { @Override public Network convertToNetwork(BaseNetwork baseNetwork) { AwsNetwork awsNetwork = (AwsNetwork) baseNetwork; Map<String, Object> param = new HashMap<>(); param.put(AwsNetworkView.VPC_ID, awsNetwork.getVpcId()); param.put(AwsNetworkView.REGION, awsNetwork.getEnvironments().stream().findFirst().get().getLocation()); return new Network(null, param); } AwsEnvironmentNetworkConverter(EnvironmentViewConverter environmentViewConverter); }
AwsEnvironmentNetworkConverter extends EnvironmentBaseNetworkConverter { @Override public Network convertToNetwork(BaseNetwork baseNetwork) { AwsNetwork awsNetwork = (AwsNetwork) baseNetwork; Map<String, Object> param = new HashMap<>(); param.put(AwsNetworkView.VPC_ID, awsNetwork.getVpcId()); param.put(AwsNetworkView.REGION, awsNetwork.getEnvironments().stream().findFirst().get().getLocation()); return new Network(null, param); } AwsEnvironmentNetworkConverter(EnvironmentViewConverter environmentViewConverter); @Override boolean isApplicableForDwx(CloudSubnet cloudSubnet); @Override boolean isApplicableForMlx(CloudSubnet cloudSubnet); @Override BaseNetwork setCreatedCloudNetwork(BaseNetwork baseNetwork, CreatedCloudNetwork createdCloudNetwork); @Override CloudPlatform getCloudPlatform(); @Override Network convertToNetwork(BaseNetwork baseNetwork); }
AwsEnvironmentNetworkConverter extends EnvironmentBaseNetworkConverter { @Override public Network convertToNetwork(BaseNetwork baseNetwork) { AwsNetwork awsNetwork = (AwsNetwork) baseNetwork; Map<String, Object> param = new HashMap<>(); param.put(AwsNetworkView.VPC_ID, awsNetwork.getVpcId()); param.put(AwsNetworkView.REGION, awsNetwork.getEnvironments().stream().findFirst().get().getLocation()); return new Network(null, param); } AwsEnvironmentNetworkConverter(EnvironmentViewConverter environmentViewConverter); @Override boolean isApplicableForDwx(CloudSubnet cloudSubnet); @Override boolean isApplicableForMlx(CloudSubnet cloudSubnet); @Override BaseNetwork setCreatedCloudNetwork(BaseNetwork baseNetwork, CreatedCloudNetwork createdCloudNetwork); @Override CloudPlatform getCloudPlatform(); @Override Network convertToNetwork(BaseNetwork baseNetwork);  }