use of org.jboss.tools.openshift.common.core.connection.ConnectionsFactory in project jbosstools-openshift by jbosstools.
the class ConnectionsFactoryTest method setUp.
@Before
public void setUp() {
this.connectionsFactory = new ConnectionsFactory();
((ConnectionsFactory) connectionsFactory).addConnectionFactory(createConnectionFactory(A_CONNECTION_FACTORY_ID, AConnection.class, A_CONNECTION_SERVER));
((ConnectionsFactory) connectionsFactory).addConnectionFactory(createConnectionFactory(OTHER_CONNECTION_FACTORY_ID, OtherConnection.class, OTHER_CONNECTION_SERVER));
}
use of org.jboss.tools.openshift.common.core.connection.ConnectionsFactory in project jbosstools-openshift by jbosstools.
the class ConnectionsFactoryTest method addShouldAddAFactory.
@Test
public void addShouldAddAFactory() {
// pre-condition
ConnectionsFactory connectionsFactory = new ConnectionsFactory();
Collection<IConnectionFactory> allFactories = connectionsFactory.getAll();
assertThat(allFactories).isEmpty();
// operation
((ConnectionsFactory) connectionsFactory).addConnectionFactory(createConnectionFactory(A_CONNECTION_FACTORY_ID, AConnection.class, "http://localhost"));
// verification
assertThat(connectionsFactory.getAll()).hasSize(1);
}
Aggregations