use of com.openshift.restclient.model.IService in project jbosstools-openshift by jbosstools.
the class ResourceUtilsTest method shouldReturnDeploymentConfigForServiceByRCAndPodGivenServiceHasNoDCNameSelector.
@Test
public void shouldReturnDeploymentConfigForServiceByRCAndPodGivenServiceHasNoDCNameSelector() throws CoreException {
// given
Connection connection = ResourceMocks.create3ProjectsConnection();
IService service = ResourceMocks.PROJECT2_SERVICES[2];
// when
IDeploymentConfig dc = ResourceUtils.getDeploymentConfigFor(service, connection);
// then
assertThat(dc).isEqualTo(ResourceMocks.PROJECT2_DEPLOYMENTCONFIGS[0]);
}
use of com.openshift.restclient.model.IService in project jbosstools-openshift by jbosstools.
the class ResourceUtilsTest method serviceAndRouteWithSameNameShouldBeRelated.
public void serviceAndRouteWithSameNameShouldBeRelated() {
// given
IRoute route = mock(IRoute.class);
when(route.getServiceName()).thenReturn("42");
IService service = mock(IService.class);
when(service.getName()).thenReturn("42");
// when
// then
assertThat(areRelated(route, service)).isTrue();
}
Aggregations