use of com.spotify.helios.cli.command.PortMappingParser.PortMappingWithName in project helios by spotify.
the class PortMappingParserTest method testParsePortMappingGoodSpecs.
@Test
public void testParsePortMappingGoodSpecs() throws Exception {
for (final TestData d : GOOD_SPECS) {
final PortMappingWithName mappingWithName = PortMappingParser.parsePortMapping(d.getSpec());
final PortMapping portMapping = mappingWithName.portMapping();
assertThat(mappingWithName.name(), equalTo(d.getName()));
assertThat(portMapping.getInternalPort(), equalTo(d.getPortMapping().getInternalPort()));
assertThat(portMapping.getExternalPort(), equalTo(d.getPortMapping().getExternalPort()));
assertThat(portMapping.getProtocol(), equalTo(d.getPortMapping().getProtocol()));
}
}
Aggregations