use of org.jboss.tools.openshift.internal.common.ui.connection.ConnectionWizardPageModel in project jbosstools-openshift by jbosstools.
the class ConnectionWizardPageModelTest method getAllConnections_should_return_only_edited_connection_and_NewConnectionMarker_if_connection_change_is_disallowed.
@Test
public void getAllConnections_should_return_only_edited_connection_and_NewConnectionMarker_if_connection_change_is_disallowed() {
// pre-condition
ConnectionWizardPageModel model = new TestableConnectionWizardPageModel(editedConnection, allConnections, null, false, wizardModel);
// operation
// verification
assertThat(model.getAllConnections()).containsExactlyElementsOf(Arrays.asList(NewConnectionMarker.getInstance(), editedConnection));
}
use of org.jboss.tools.openshift.internal.common.ui.connection.ConnectionWizardPageModel in project jbosstools-openshift by jbosstools.
the class ConnectionWizardPageModelTest method getAllHosts_should_return_all_hosts_within_all_connections.
@Test
public void getAllHosts_should_return_all_hosts_within_all_connections() {
// pre-condition
ConnectionWizardPageModel model = new TestableConnectionWizardPageModel(editedConnection, allConnections, null, false, wizardModel);
// operation
Collection<String> allHosts = model.getAllHosts();
// verification
assertThat(allHosts).containsOnly(this.allHosts);
}
Aggregations