Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2010-04-21 21:10:26 +0000
committerfbecker2010-04-21 21:10:26 +0000
commit610de152db7ae9172109bf0182ca48ad323ee95a (patch)
tree6e85f5a0eb238ff28a0f1227c036f83a0b4da9a4 /org.eclipse.mylyn.bugzilla.tests
parentaa164611d33f5ff40d720aee7fe93aa0b7412335 (diff)
downloadorg.eclipse.mylyn.tasks-610de152db7ae9172109bf0182ca48ad323ee95a.tar.gz
org.eclipse.mylyn.tasks-610de152db7ae9172109bf0182ca48ad323ee95a.tar.xz
org.eclipse.mylyn.tasks-610de152db7ae9172109bf0182ca48ad323ee95a.zip
ASSIGNED - bug 282211: create Webservice API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=282211
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests')
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXMLRPCTest.java63
2 files changed, 66 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF
index b208a258e..94405c3a6 100644
--- a/org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF
@@ -24,7 +24,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.mylyn.bugzilla.ide,
org.eclipse.mylyn.commons.ui,
org.eclipse.compare,
- org.eclipse.mylyn.commons.core
+ org.eclipse.mylyn.commons.core,
+ org.eclipse.mylyn.commons.xmlrpc;bundle-version="[3.4.0,4.0.0)",
+ org.apache.xmlrpc
Bundle-Vendor: Eclipse Mylyn
Bundle-ClassPath: bugzilla-test.jar
Export-Package: org.eclipse.mylyn.bugzilla.tests;x-internal:=true,
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXMLRPCTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXMLRPCTest.java
new file mode 100644
index 000000000..5af7eae3f
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaXMLRPCTest.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Frank Becker and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Frank Becker - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.bugzilla.tests.core;
+
+import java.util.Date;
+import java.util.HashMap;
+
+import org.eclipse.mylyn.bugzilla.tests.BugzillaTestConstants;
+import org.eclipse.mylyn.commons.net.AuthenticationType;
+import org.eclipse.mylyn.commons.net.WebLocation;
+import org.eclipse.mylyn.internal.bugzilla.core.service.BugzillaXmlRpcClient;
+import org.junit.Before;
+import org.junit.Test;
+
+public class BugzillaXMLRPCTest {
+ private BugzillaXmlRpcClient bugzillaClient;
+
+// private static String TEST_REPO = "http://.../Bugzilla36noRPC";
+
+// private static String TEST_REPO = "http://.../Bugzilla36";
+
+ @Before
+ public void setUp() throws Exception {
+// WebLocation webLocation = new WebLocation(TEST_REPO + "/xmlrpc.cgi");
+// webLocation.setCredentials(AuthenticationType.REPOSITORY, "user", "password");
+// webLocation.setCredentials(AuthenticationType.HTTP, "user", "password");
+ WebLocation webLocation = new WebLocation(BugzillaTestConstants.TEST_BUGZILLA_HEAD_URL + "/xmlrpc.cgi");
+ webLocation.setCredentials(AuthenticationType.REPOSITORY, "tests@mylyn.eclipse.org", "mylyntest");
+ bugzillaClient = new BugzillaXmlRpcClient(webLocation);
+ bugzillaClient.setContentTypeCheckingEnabled(true);
+ }
+
+ @Test
+ @SuppressWarnings("unused")
+ public void testxmlrpc() throws Exception {
+ int uID = bugzillaClient.login();
+ String x0 = bugzillaClient.getVersion();
+ HashMap<?, ?> x1 = bugzillaClient.getTime();
+ Date x2 = bugzillaClient.getDBTime();
+ Date x3 = bugzillaClient.getWebTime();
+ Object[] xx0 = bugzillaClient.getUserInfoFromIDs(new Integer[] { 1, 2 });
+ Object[] xx1 = bugzillaClient.getUserInfoFromNames(new String[] { "Frank@Frank-Becker.de" });
+ Object[] xx2 = bugzillaClient.getUserInfoWithMatch(new String[] { "eck" });
+ Object[] xx3 = bugzillaClient.getAllFields();
+ Object[] xx4 = bugzillaClient.getFieldsWithNames(new String[] { "qa_contact" });
+ Object[] xx5 = bugzillaClient.getFieldsWithIDs(new Integer[] { 12, 18 });
+ Object[] xx6 = bugzillaClient.getSelectableProducts();
+ Object[] xx7 = bugzillaClient.getEnterableProducts();
+ Object[] xx8 = bugzillaClient.getAccessibleProducts();
+ Object[] xx9 = bugzillaClient.getProducts(new Integer[] { 1, 3 });
+ int i = 9;
+ i++;
+ }
+}

Back to the top