Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2016-08-19 23:19:13 +0000
committerGerrit Code Review @ Eclipse.org2016-08-19 23:19:14 +0000
commit1bea0227e7481ae9a75f0b2824d99d7c5f53570a (patch)
tree396f3116bb56c3593bdb4ee0373b61ce7cb0100a
parentb4192093f19e96407f031183c73746600838ef74 (diff)
parent2fc1cebfc9b81f4511bee20e71428c03a229b4ce (diff)
downloadjgit-1bea0227e7481ae9a75f0b2824d99d7c5f53570a.tar.gz
jgit-1bea0227e7481ae9a75f0b2824d99d7c5f53570a.tar.xz
jgit-1bea0227e7481ae9a75f0b2824d99d7c5f53570a.zip
Merge "DownloadTest: Use enums from org.apache.http.HttpStatus"
-rw-r--r--org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
index 033ed0edf2..f92e638e80 100644
--- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
+++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
@@ -42,6 +42,8 @@
*/
package org.eclipse.jgit.lfs.server.fs;
+import static org.apache.http.HttpStatus.SC_NOT_FOUND;
+import static org.apache.http.HttpStatus.SC_UNPROCESSABLE_ENTITY;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -80,7 +82,8 @@ public class DownloadTest extends LfsServerTest {
} catch (RuntimeException e) {
String error = String.format(
"Invalid pathInfo '/%s' does not match '/{SHA-256}'", id);
- assertEquals(formatErrorMessage(422, error), e.getMessage());
+ assertEquals(formatErrorMessage(SC_UNPROCESSABLE_ENTITY, error),
+ e.getMessage());
}
}
@@ -95,7 +98,8 @@ public class DownloadTest extends LfsServerTest {
fail("expected RuntimeException");
} catch (RuntimeException e) {
String error = String.format("Invalid id: : %s", id);
- assertEquals(formatErrorMessage(422, error), e.getMessage());
+ assertEquals(formatErrorMessage(SC_UNPROCESSABLE_ENTITY, error),
+ e.getMessage());
}
}
@@ -110,7 +114,8 @@ public class DownloadTest extends LfsServerTest {
fail("expected RuntimeException");
} catch (RuntimeException e) {
String error = String.format("Object '%s' not found", id.getName());
- assertEquals(formatErrorMessage(404, error), e.getMessage());
+ assertEquals(formatErrorMessage(SC_NOT_FOUND, error),
+ e.getMessage());
}
}

Back to the top