Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-12-13 00:06:18 +0000
committerKevin Sawicki2011-12-13 00:06:18 +0000
commit6f3bc9c4fa39c7da1f2d4b2ab69ef3ab2829b31c (patch)
tree488eb3cd9c17584dcb0dfb007dd05dfc5aa4513f
parentca40854c3794b7e720e9d3762c3bbd45c5674c9b (diff)
downloadegit-github-6f3bc9c4.tar.gz
egit-github-6f3bc9c4.tar.xz
egit-github-6f3bc9c4.zip
Remove Apache HttpComponents dependency from tests
Only constants were being used that were also available from the HttpURLConnection class Change-Id: I5c1376ab7791143985c2fe21e417b332549c9366
-rw-r--r--org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GitHubClientTest.java1
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/LabelTest.java6
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/MilestoneTest.java6
4 files changed, 6 insertions, 8 deletions
diff --git a/org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF b/org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF
index 7e0cfb24..745945a4 100644
--- a/org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF
@@ -7,7 +7,6 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: com.google.gson;version="[1.6.0,2.0.0)",
com.google.gson.reflect;version="[1.6.0,2.0.0)",
- org.apache.http;version="[4.1.0,5.0.0)",
org.eclipse.egit.github.core;version="[1.3.0,1.4.0)",
org.eclipse.egit.github.core.client;version="[1.3.0,1.4.0)",
org.eclipse.egit.github.core.service;version="[1.3.0,1.4.0)",
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GitHubClientTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GitHubClientTest.java
index 6eae112b..17e29140 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GitHubClientTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GitHubClientTest.java
@@ -12,7 +12,6 @@ package org.eclipse.egit.github.core.tests;
import static org.junit.Assert.assertEquals;
-import org.apache.http.HttpHost;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.client.IGitHubConstants;
import org.junit.Test;
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/LabelTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/LabelTest.java
index 91bebfbe..bb84d98c 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/LabelTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/LabelTest.java
@@ -10,13 +10,13 @@
*****************************************************************************/
package org.eclipse.egit.github.core.tests.live;
+import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.util.List;
-import org.apache.http.HttpStatus;
import org.eclipse.egit.github.core.Label;
import org.eclipse.egit.github.core.client.RequestException;
import org.eclipse.egit.github.core.service.LabelService;
@@ -29,7 +29,7 @@ public class LabelTest extends LiveTest {
/**
* Test creating and deleting a label
- *
+ *
* @throws Exception
*/
@Test
@@ -64,7 +64,7 @@ public class LabelTest extends LiveTest {
service.getLabel(client.getUser(), writableRepo, created.getName());
fail("Fetch did not throw exception");
} catch (RequestException e) {
- assertEquals(HttpStatus.SC_NOT_FOUND, e.getStatus());
+ assertEquals(HTTP_NOT_FOUND, e.getStatus());
}
}
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/MilestoneTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/MilestoneTest.java
index 4197a763..21304974 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/MilestoneTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/MilestoneTest.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.egit.github.core.tests.live;
+import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
@@ -17,7 +18,6 @@ import static org.junit.Assert.fail;
import java.util.Date;
import java.util.List;
-import org.apache.http.HttpStatus;
import org.eclipse.egit.github.core.Milestone;
import org.eclipse.egit.github.core.client.RequestException;
import org.eclipse.egit.github.core.service.MilestoneService;
@@ -30,7 +30,7 @@ public class MilestoneTest extends LiveTest {
/**
* Test creating and deleting a milestone
- *
+ *
* @throws Exception
*/
@Test
@@ -93,7 +93,7 @@ public class MilestoneTest extends LiveTest {
Integer.toString(created.getNumber()));
fail("Fetch did not throw exception");
} catch (RequestException e) {
- assertEquals(HttpStatus.SC_NOT_FOUND, e.getStatus());
+ assertEquals(HTTP_NOT_FOUND, e.getStatus());
}
}
}

Back to the top