Search in sources :

Example 11 with Odo

use of org.jboss.tools.openshift.core.odo.Odo in project jbosstools-openshift by jbosstools.

the class OpenShiftApplicationExplorerContentProviderTest method setup.

@Before
public void setup() throws Exception {
    odo = mock(Odo.class);
    ClusterClient info = mock(ClusterClient.class);
    doReturn(odo).when(info).getOdo();
    OdoCliFactory factory = mock(OdoCliFactory.class);
    doReturn(CompletableFuture.completedFuture(odo)).when(factory).getOdo();
    this.model = new ApplicationExplorerUIModel(info) {

        @Override
        protected OdoCliFactory getFactory() {
            return factory;
        }
    };
    this.provider = new OpenShiftApplicationExplorerContentProvider(model) {
    };
}
Also used : ClusterClient(org.jboss.tools.openshift.internal.ui.models.applicationexplorer.ApplicationExplorerUIModel.ClusterClient) ApplicationExplorerUIModel(org.jboss.tools.openshift.internal.ui.models.applicationexplorer.ApplicationExplorerUIModel) OdoCliFactory(org.jboss.tools.openshift.internal.ui.odo.OdoCliFactory) OpenShiftApplicationExplorerContentProvider(org.jboss.tools.openshift.internal.ui.applicationexplorer.OpenShiftApplicationExplorerContentProvider) Odo(org.jboss.tools.openshift.core.odo.Odo) Before(org.junit.Before)

Aggregations

Odo (org.jboss.tools.openshift.core.odo.Odo)11 IOException (java.io.IOException)9 IWizard (org.eclipse.jface.wizard.IWizard)6 ISelection (org.eclipse.jface.viewers.ISelection)3 ApplicationExplorerUIModel (org.jboss.tools.openshift.internal.ui.models.applicationexplorer.ApplicationExplorerUIModel)3 ApplicationElement (org.jboss.tools.openshift.internal.ui.models.applicationexplorer.ApplicationElement)2 ComponentElement (org.jboss.tools.openshift.internal.ui.models.applicationexplorer.ComponentElement)2 LinkModel (org.jboss.tools.openshift.internal.ui.wizard.applicationexplorer.LinkModel)2 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 ExecutionException (org.eclipse.core.commands.ExecutionException)1 IProject (org.eclipse.core.resources.IProject)1 Status (org.eclipse.core.runtime.Status)1 MessageDialog (org.eclipse.jface.dialogs.MessageDialog)1 Window (org.eclipse.jface.window.Window)1 Shell (org.eclipse.swt.widgets.Shell)1 WizardUtils (org.jboss.tools.common.ui.WizardUtils)1 LabelNotification (org.jboss.tools.common.ui.notification.LabelNotification)1 Component (org.jboss.tools.openshift.core.odo.Component)1 ComponentInfo (org.jboss.tools.openshift.core.odo.ComponentInfo)1