Search in sources :

Example 1 with PortMappingWithName

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()));
    }
}
Also used : PortMappingWithName(com.spotify.helios.cli.command.PortMappingParser.PortMappingWithName) PortMapping(com.spotify.helios.common.descriptors.PortMapping) Test(org.junit.Test)

Aggregations

PortMappingWithName (com.spotify.helios.cli.command.PortMappingParser.PortMappingWithName)1 PortMapping (com.spotify.helios.common.descriptors.PortMapping)1 Test (org.junit.Test)1