diff options
author | Steffen Pingel | 2013-10-08 04:52:45 +0000 |
---|---|---|
committer | Steffen Pingel | 2013-10-08 04:53:28 +0000 |
commit | ef86bdea135ee4bc3457a1ed34426841562b7ec4 (patch) | |
tree | 53cd8c894d6152d797bc5e102ad28f8f5de9538f /org.eclipse.mylyn.bugzilla.tests/src | |
parent | 3b1cb33184c84edfc8a6bba711ab9d47acd648b4 (diff) | |
download | org.eclipse.mylyn.tasks-ef86bdea135ee4bc3457a1ed34426841562b7ec4.tar.gz org.eclipse.mylyn.tasks-ef86bdea135ee4bc3457a1ed34426841562b7ec4.tar.xz org.eclipse.mylyn.tasks-ef86bdea135ee4bc3457a1ed34426841562b7ec4.zip |
326119: fix failing repository settings page test for Bugzilla
Change-Id: Ie1651b8e82d3fe2ee59e93537170d16533c86ed9
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=326119
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests/src')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java index 3af709b9a..484219efd 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java @@ -165,7 +165,7 @@ public class BugzillaRepositorySettingsPageTest extends TestCase { assertEquals(tempPass, repositoryTest.getPassword()); } - public void testPersistChangeUserId() throws Exception { + public void testValidateOnFinishInvalidUserId() throws Exception { assertEquals(1, manager.getAllRepositories().size()); EditRepositoryWizard wizard = new EditRepositoryWizard(repository); WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard); @@ -174,24 +174,14 @@ public class BugzillaRepositorySettingsPageTest extends TestCase { BugzillaClient client = createClient(page.getRepositoryUrl(), page.getUserName(), page.getPassword(), page.getHttpAuthUserId(), page.getHttpAuthPassword(), page.getCharacterEncoding()); client.validate(null); + String oldUserId = page.getUserName(); page.setUserId("bogus"); - wizard.performFinish(); + boolean finished = wizard.performFinish(); + assertFalse(finished); assertEquals(1, manager.getAllRepositories().size()); TaskRepository repositoryTest = manager.getRepository(BugzillaCorePlugin.CONNECTOR_KIND, BugzillaFixture.current().getRepositoryUrl()); - assertNotNull(repositoryTest); - wizard = new EditRepositoryWizard(repositoryTest); - dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard); - dialog.create(); - page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage(); - try { - client = createClient(page.getRepositoryUrl(), page.getUserName(), page.getPassword(), - page.getHttpAuthUserId(), page.getHttpAuthPassword(), page.getCharacterEncoding()); - client.validate(null); - } catch (CoreException e) { - return; - } - fail("LoginException didn't occur!"); + assertEquals(oldUserId, repositoryTest.getCredentials(AuthenticationType.REPOSITORY).getUserName()); } } |