diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2010-10-08 01:03:17 +0300 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2010-10-08 01:03:17 +0300 |
commit | 784d388c497efcb4a9b004cf9c97efed14719dd7 (patch) | |
tree | 91a4fcff389f8ec14918f6d51f5a3aeed102b845 /org.eclipse.jgit.http.test/tst/org/eclipse | |
parent | 2b98a878b49dedd0e5c275793698190fd281aad9 (diff) | |
download | jgit-784d388c497efcb4a9b004cf9c97efed14719dd7.tar.gz jgit-784d388c497efcb4a9b004cf9c97efed14719dd7.zip |
Externalize strings in TransportHttp
Some strings were not externalized. Also use them in HTTP tests to
ensure that they will also succeed when message bundles are
translated.
Change-Id: Id02717176557e7d57e676e1339cd89f2be88d330
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java | 9 | ||||
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java index 9c4b3ee09d..06a4eb6a73 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java @@ -52,6 +52,7 @@ import javax.servlet.http.HttpServletRequest; import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jgit.JGitText; import org.eclipse.jgit.errors.NoRemoteRepositoryException; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.errors.TransportException; @@ -280,8 +281,8 @@ public class HttpClientTests extends HttpTestCase { t.openFetch(); fail("connection opened even info/refs needs auth basic"); } catch (TransportException err) { - String status = "authentication not supported"; - String exp = dumbAuthBasicURI + ": " + status; + String exp = dumbAuthBasicURI + ": " + + JGitText.get().authenticationNotSupported; assertEquals(exp, err.getMessage()); } } finally { @@ -297,8 +298,8 @@ public class HttpClientTests extends HttpTestCase { t.openFetch(); fail("connection opened even though service disabled"); } catch (TransportException err) { - String status = "authentication not supported"; - String exp = smartAuthBasicURI + ": " + status; + String exp = smartAuthBasicURI + ": " + + JGitText.get().authenticationNotSupported; assertEquals(exp, err.getMessage()); } } finally { diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java index 87e2555a6c..6f06f1f9a7 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java @@ -66,6 +66,7 @@ import org.eclipse.jetty.servlet.FilterHolder; import org.eclipse.jetty.servlet.FilterMapping; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jgit.JGitText; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.errors.TransportException; import org.eclipse.jgit.http.server.GitServlet; @@ -398,8 +399,8 @@ public class SmartClientSmartServerTest extends HttpTestCase { t.push(NullProgressMonitor.INSTANCE, Collections.singleton(u)); fail("anonymous push incorrectly accepted without error"); } catch (TransportException e) { - final String status = "authentication not supported"; - final String exp = remoteURI.toString() + ": " + status; + final String exp = remoteURI + ": " + + JGitText.get().authenticationNotSupported; assertEquals(exp, e.getMessage()); } } finally { |