Search in sources :

Example 1 with WebHooksPropertySource

use of org.jboss.tools.openshift.internal.ui.property.build.WebHooksPropertySource in project jbosstools-openshift by jbosstools.

the class WebhooksPropertySourceTest method test.

@Test
public void test() {
    List<IBuildTrigger> triggers = givenBuildTriggers();
    WebHooksPropertySource source = new WebHooksPropertySource(triggers);
    IPropertyDescriptor[] propertyDescriptors = source.getPropertyDescriptors();
    assertEquals("Exp. descripter for each webhook only", 2, propertyDescriptors.length);
    assertEquals("Generic", propertyDescriptors[0].getId());
    assertEquals("GitHub", propertyDescriptors[1].getId());
}
Also used : WebHooksPropertySource(org.jboss.tools.openshift.internal.ui.property.build.WebHooksPropertySource) IPropertyDescriptor(org.eclipse.ui.views.properties.IPropertyDescriptor) IBuildTrigger(com.openshift.restclient.model.build.IBuildTrigger) Test(org.junit.Test)

Aggregations

IBuildTrigger (com.openshift.restclient.model.build.IBuildTrigger)1 IPropertyDescriptor (org.eclipse.ui.views.properties.IPropertyDescriptor)1 WebHooksPropertySource (org.jboss.tools.openshift.internal.ui.property.build.WebHooksPropertySource)1 Test (org.junit.Test)1