Search in sources :

Example 1 with ResourceLabelsWizardPage

use of org.jboss.tools.openshift.reddeer.wizard.page.ResourceLabelsWizardPage in project jbosstools-openshift by jbosstools.

the class LabelsTest method testCreateDuplicativeLabel.

@Test
public void testCreateDuplicativeLabel() {
    ResourceLabelsWizardPage page = new ResourceLabelsWizardPage();
    String name = "label";
    String value = "value";
    page.createLabel(name, value);
    try {
        page.createLabel(name, value);
        fail("It should not be possible to create duplicitive labels");
    } catch (RedDeerException ex) {
    // pass
    } finally {
        closeResourceLabelShell();
    }
}
Also used : ResourceLabelsWizardPage(org.jboss.tools.openshift.reddeer.wizard.page.ResourceLabelsWizardPage) RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) Test(org.junit.Test)

Example 2 with ResourceLabelsWizardPage

use of org.jboss.tools.openshift.reddeer.wizard.page.ResourceLabelsWizardPage in project jbosstools-openshift by jbosstools.

the class LabelsTest method testCreateDuplicativeReadOnlyLabel.

@Test
public void testCreateDuplicativeReadOnlyLabel() {
    ResourceLabelsWizardPage page = new ResourceLabelsWizardPage();
    try {
        page.createLabel("template", "noway");
        fail("It should not be possible to create duplicite labels of already existing read only label");
    } catch (RedDeerException ex) {
    // pass
    } finally {
        closeResourceLabelShell();
    }
}
Also used : ResourceLabelsWizardPage(org.jboss.tools.openshift.reddeer.wizard.page.ResourceLabelsWizardPage) RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) Test(org.junit.Test)

Aggregations

RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)2 ResourceLabelsWizardPage (org.jboss.tools.openshift.reddeer.wizard.page.ResourceLabelsWizardPage)2 Test (org.junit.Test)2