use of org.eclipse.linuxtools.docker.core.IDockerImage in project jbosstools-openshift by jbosstools.
the class DeployImageWizardModelTest method resourceNameIsReturnedWhenSettingADockerImage.
@Test
public void resourceNameIsReturnedWhenSettingADockerImage() {
IDockerImage image = mock(IDockerImage.class);
when(image.repoTags()).thenReturn(Collections.singletonList("image:latest"));
when(dockerConnection.getImages()).thenReturn(Collections.singletonList(image));
model.setDockerConnection(dockerConnection);
model.setImageName("image:latest");
assertThat(model.getResourceName()).isEqualTo("image");
}
Aggregations