From 24468f09e3fb991ea5a6af293f84c7fe37e78b95 Mon Sep 17 00:00:00 2001 From: Andrey Loskutov Date: Sun, 3 Jan 2016 15:27:01 +0100 Subject: Added CLIText.fatalError(String) API for tests In different places (Main, TextBuiltin, CLIGitCommand) we report fatal errors and at same time want to check for fatal errors in the tests. Using common API simplifies the error testing and helps to navigate to the actual error check implementation. Change-Id: Iecde79beb33ea595171f168f46b0b10ab2f339bb Signed-off-by: Andrey Loskutov --- org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'org.eclipse.jgit.pgm.test/src/org/eclipse/jgit') diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java index 7d2cbca729..6a12019d7c 100644 --- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java +++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java @@ -44,7 +44,6 @@ package org.eclipse.jgit.pgm; import java.io.ByteArrayOutputStream; import java.io.File; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; @@ -106,8 +105,7 @@ public class CLIGitCommand { try { return IO.readLines(new String(rawExecute(str, db))); } catch (Die e) { - return IO.readLines(MessageFormat.format(CLIText.get().fatalError, - e.getMessage())); + return IO.readLines(CLIText.fatalError(e.getMessage())); } } -- cgit v1.2.3