use of org.jboss.tools.openshift.internal.ui.models.IElementListener in project jbosstools-openshift by jbosstools.
the class OpenShiftExplorerContentProviderTest method modelShouldNotifyConnectionAddedInRegistry.
@Test
public void modelShouldNotifyConnectionAddedInRegistry() throws InterruptedException, MalformedURLException {
// given
Connection connection2 = ConnectionTestUtils.createConnection("anotherUser", "654321", "https://127.0.0.1:8181");
IElementListener listener = spy(new VoidElementListener());
model.addListener(listener);
// when
registry.add(connection2);
// then
verify(listener, timeout(10 * 1000)).elementChanged(any());
}
use of org.jboss.tools.openshift.internal.ui.models.IElementListener in project jbosstools-openshift by jbosstools.
the class OpenShiftExplorerContentProviderTest method modelShouldNotifyConnectionRemovedInRegistry.
@Test
public void modelShouldNotifyConnectionRemovedInRegistry() throws InterruptedException, MalformedURLException {
// given
IElementListener listener = spy(new VoidElementListener());
model.addListener(listener);
// when
registry.remove(connection);
// then
verify(listener, timeout(10 * 1000)).elementChanged(any());
}
Aggregations