Search in sources :

Example 1 with PodPortValidator

use of org.jboss.tools.openshift.internal.ui.wizard.deployimage.PodPortValidator in project jbosstools-openshift by jbosstools.

the class PodPortValidatorTest method createPodPortValidator.

static PodPortValidator createPodPortValidator() {
    IServicePort port1 = Mockito.mock(IServicePort.class);
    Mockito.when(port1.getPort()).thenReturn(1000);
    Mockito.when(port1.getTargetPort()).thenReturn("3000");
    IServicePort port2 = Mockito.mock(IServicePort.class);
    Mockito.when(port2.getPort()).thenReturn(2000);
    Mockito.when(port2.getTargetPort()).thenReturn("home");
    return new PodPortValidator(CURRENT_VALUE, Arrays.asList(port1, port2));
}
Also used : IServicePort(com.openshift.restclient.model.IServicePort) PodPortValidator(org.jboss.tools.openshift.internal.ui.wizard.deployimage.PodPortValidator)

Aggregations

IServicePort (com.openshift.restclient.model.IServicePort)1 PodPortValidator (org.jboss.tools.openshift.internal.ui.wizard.deployimage.PodPortValidator)1