Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2014-06-02 15:40:43 -0400
committerFrank Becker2014-10-08 13:51:15 -0400
commit1025e8adfa3b1f61dc1c07bc3ef0ca22140f046c (patch)
treeb16f43f178ec52ee0bade743082ee59a3122d309 /connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests
parentdbdd93c8144c4016d81cb245226545c2252c8939 (diff)
downloadorg.eclipse.mylyn.tasks-1025e8adfa3b1f61dc1c07bc3ef0ca22140f046c.tar.gz
org.eclipse.mylyn.tasks-1025e8adfa3b1f61dc1c07bc3ef0ca22140f046c.tar.xz
org.eclipse.mylyn.tasks-1025e8adfa3b1f61dc1c07bc3ef0ca22140f046c.zip
436398: change connector tests to reduce dependency on the UI
Change-Id: Ieb5a60ab2fc1ee0bb83d91d604570be3704c22a7 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=436398
Diffstat (limited to 'connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests')
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF9
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java22
2 files changed, 18 insertions, 13 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF
index 524afa81f..145f54574 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.junit;bundle-version="4.8.2",
org.eclipse.mylyn.commons.repositories.http.core;bundle-version="1.3.0",
org.eclipse.mylyn.tasks.ui,
org.eclipse.mylyn.tasks.core;bundle-version="3.11.0",
- org.eclipse.mylyn.bugzilla.rest.core,
- org.eclipse.mylyn.bugzilla.rest.ui
-Export-Package: org.eclipse.mylyn.bugzilla.rest.tests;x-internal:=true,
- org.eclipse.mylyn.bugzilla.rest.tests.tck;x-internal:=true
+ org.eclipse.mylyn.bugzilla.rest.ui,
+ org.eclipse.mylyn.bugzilla.rest.core;bundle-version="1.0.0"
+Export-Package: org.eclipse.mylyn.bugzilla.rest.tests,
+ org.eclipse.mylyn.bugzilla.rest.tests.tck,
+ org.eclipse.mylyn.bugzilla.rest.tests.tck.ui
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java
index 34e05260f..cc683cf28 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java
@@ -11,20 +11,19 @@
package org.eclipse.mylyn.bugzilla.rest.tests.tck.ui;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.bugzilla.rest.tests.AbstractTckTest;
import org.eclipse.mylyn.bugzilla.rest.tests.TckFixture;
import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner.FixtureDefinition;
import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner.RunOnlyWhenProperty;
+import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestConnector;
+import org.eclipse.mylyn.internal.bugzilla.rest.ui.BugzillaRestRepositoryConnectorUi;
import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
import org.eclipse.swt.widgets.Shell;
import org.junit.After;
-import org.junit.Ignore;
+import org.junit.Before;
import org.junit.Test;
@FixtureDefinition(fixtureClass = TckFixture.class, fixtureType = "bugzillaREST")
@@ -36,6 +35,10 @@ public class AbstractRepositorySettingsPageTest extends AbstractTckTest {
super(fixture);
}
+ @Before
+ public void setup() {
+ }
+
@After
public void tearDown() throws Exception {
if (dialog != null) {
@@ -44,17 +47,18 @@ public class AbstractRepositorySettingsPageTest extends AbstractTckTest {
}
@Test
- @Ignore
- //we temporary disable this test (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=436398)
public void testApplyTo() {
TaskRepository repository = fixture().createRepository();
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
+ BugzillaRestConnector connector = new BugzillaRestConnector();
+ BugzillaRestRepositoryConnectorUi connectorUi = new BugzillaRestRepositoryConnectorUi(connector);
+ EditRepositoryWizard wizard = new EditRepositoryWizard(repository, connectorUi);
dialog = new WizardDialog(new Shell(), wizard);
dialog.create();
ITaskRepositoryPage page = wizard.getSettingsPage();
- assertNull("repository.getCategory() should be null", repository.getCategory());
+ // we need this because save removes the static import of org.junit.Assert
+ org.junit.Assert.assertNull("repository.getCategory() should be null", repository.getCategory());
page.applyTo(repository);
- assertEquals(TaskRepository.CATEGORY_BUGS, repository.getCategory());
+ org.junit.Assert.assertEquals(TaskRepository.CATEGORY_BUGS, repository.getCategory());
}
}

Back to the top