use of org.jboss.tools.openshift.core.connection.ConnectionNotFoundException in project jbosstools-openshift by jbosstools.
the class ConnectionsRegistryUtilTest method testConnectionNotFound.
@Test
public void testConnectionNotFound() {
String kind = "foo";
String name = "bar";
try {
IResource resource = mock(IResource.class);
when(resource.getKind()).thenReturn(kind);
when(resource.getName()).thenReturn(name);
ConnectionsRegistryUtil.getConnectionFor(resource);
fail();
} catch (ConnectionNotFoundException e) {
assertEquals("Unable to find the connection for a " + kind + " named " + name, e.getMessage());
}
}
Aggregations