diff options
author | Frank Becker | 2012-02-26 13:58:55 +0000 |
---|---|---|
committer | Frank Becker | 2012-02-26 13:58:55 +0000 |
commit | 2952584b62acdfc6ada2c532f41717cfed9e73ea (patch) | |
tree | b42034898c47db9e8e4538f3933c6f815fea3891 /org.eclipse.mylyn.bugzilla.tests | |
parent | c2f4cab9b71b2392ad32f30409c229bfb33a4c5b (diff) | |
download | org.eclipse.mylyn.tasks-2952584b62acdfc6ada2c532f41717cfed9e73ea.tar.gz org.eclipse.mylyn.tasks-2952584b62acdfc6ada2c532f41717cfed9e73ea.tar.xz org.eclipse.mylyn.tasks-2952584b62acdfc6ada2c532f41717cfed9e73ea.zip |
ASSIGNED - bug 372591: BugzillaXmlRpcClient.updateProductInfo should
work with Bugzilla 4.2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372591
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXmlRpcClientTest.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXmlRpcClientTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXmlRpcClientTest.java index ffa59157f..67133538a 100644 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXmlRpcClientTest.java +++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXmlRpcClientTest.java @@ -41,6 +41,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient; import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector; import org.eclipse.mylyn.internal.bugzilla.core.BugzillaVersion; import org.eclipse.mylyn.internal.bugzilla.core.CustomTransitionManager; +import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration; import org.eclipse.mylyn.internal.bugzilla.core.service.BugzillaXmlRpcClient; import org.eclipse.mylyn.internal.tasks.core.AbstractTask; import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery; @@ -968,4 +969,25 @@ public class BugzillaXmlRpcClientTest extends TestCase { } return div; } + + public void testUpdateProductInfo() throws Exception { + if (BugzillaFixture.current().getDescription().equals(BugzillaFixture.XML_RPC_DISABLED) + || BugzillaFixture.current() == BugzillaFixture.BUGS_3_4) { + return; + } + RepositoryConfiguration repositoryConfiguration = connector.getRepositoryConfiguration(repository.getRepositoryUrl()); + + for (String product : repositoryConfiguration.getProducts()) { + repositoryConfiguration.setDefaultMilestone(product, null); + } + + bugzillaClient.updateProductInfo(new NullProgressMonitor(), repositoryConfiguration); + for (String product : repositoryConfiguration.getProducts()) { + if (product.equals("ManualTest") || product.equals("Scratch") || product.equals("TestProduct")) { + assertEquals("---", repositoryConfiguration.getDefaultMilestones(product)); + } else { + fail("never reach this"); + } + } + } } |