Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2010-04-06 19:20:40 -0400
committerrelves2010-04-06 19:20:40 -0400
commitb3fd22db7d35ec7046a8d63d25f37104ebf78aff (patch)
treea3d5b984b675fc6e623eb7ec4b3c15778251bfa8 /org.eclipse.mylyn.oslc.tests
parent4a1ad6400d7a534844e137e3796acc0b3f5c2dd3 (diff)
downloadorg.eclipse.mylyn.tasks-b3fd22db7d35ec7046a8d63d25f37104ebf78aff.tar.gz
org.eclipse.mylyn.tasks-b3fd22db7d35ec7046a8d63d25f37104ebf78aff.tar.xz
org.eclipse.mylyn.tasks-b3fd22db7d35ec7046a8d63d25f37104ebf78aff.zip
NEW - bug 303015: [oslc] implement boiler plate oslc connector
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303015
Diffstat (limited to 'org.eclipse.mylyn.oslc.tests')
-rw-r--r--org.eclipse.mylyn.oslc.tests/src/org/eclipse/mylyn/oslc/cm/tests/RtcOlscTest.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.oslc.tests/src/org/eclipse/mylyn/oslc/cm/tests/RtcOlscTest.java b/org.eclipse.mylyn.oslc.tests/src/org/eclipse/mylyn/oslc/cm/tests/RtcOlscTest.java
index 1cb8f0c65..afcb0695c 100644
--- a/org.eclipse.mylyn.oslc.tests/src/org/eclipse/mylyn/oslc/cm/tests/RtcOlscTest.java
+++ b/org.eclipse.mylyn.oslc.tests/src/org/eclipse/mylyn/oslc/cm/tests/RtcOlscTest.java
@@ -11,7 +11,6 @@
package org.eclipse.mylyn.oslc.cm.tests;
-import java.net.URLEncoder;
import java.util.Collection;
import java.util.List;
import java.util.Set;
@@ -52,16 +51,16 @@ public class RtcOlscTest extends TestCase {
private static final String BASE_URL = "https://192.168.0.3:9443/jazz/oslc/workitems/catalog";
-// private static final String BASE_URL = "https://192.168.0.3:9443/jazz/oslc/contexts/_9Dyg4DLzEd-G-8cuiS4gvg/workitems/services.xml";
+ private static final String SERVICE_URL = "https://192.168.0.3:9443/jazz/oslc/contexts/_9Dyg4DLzEd-G-8cuiS4gvg/workitems/services.xml";
@Override
protected void setUp() throws Exception {
super.setUp();
- this.repository = new TaskRepository("rtc", BASE_URL);
+ this.repository = new TaskRepository("rtc", SERVICE_URL);
this.repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials("ADMIN", "ADMIN"),
false);
this.location = new TaskRepositoryLocationFactory().createWebLocation(repository);
- this.client = new AbstractOslcClient(location, new OslcServiceDescriptor(BASE_URL)) {
+ this.client = new AbstractOslcClient(location, new OslcServiceDescriptor(SERVICE_URL)) {
@Override
public RepositoryResponse putTaskData(TaskData taskData, Set<TaskAttribute> oldValues,
@@ -126,9 +125,7 @@ public class RtcOlscTest extends TestCase {
public void testSimpleQuery() throws Exception {
List<OslcServiceProvider> services = client.getAvailableServices(BASE_URL, null);
OslcServiceProvider desc = services.get(0);
- OslcServiceDescriptor serviceDescriptor = client.getServiceDescriptor(desc, null);
- Collection<AbstractChangeRequest> result = client.performQuery(serviceDescriptor.getSimpleQueryUrl()
- + "?oslc_cm.query=" + URLEncoder.encode("dc:title=\"my first work item\"", "UTF-8"), null);
+ Collection<AbstractChangeRequest> result = client.performQuery("dc:title=\"my first work item\"", null);
assertEquals(1, result.size());
AbstractChangeRequest request = result.iterator().next();
request.getTitle().equals("my first work item");

Back to the top