diff options
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackFileTest.java | 14 | ||||
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/UnpackedObjectTest.java | 8 |
2 files changed, 17 insertions, 5 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackFileTest.java index f31bf558c8..9a4bc0b1ab 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackFileTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackFileTest.java @@ -47,9 +47,11 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.security.MessageDigest; +import java.text.MessageFormat; import java.util.Arrays; import java.util.zip.Deflater; +import org.eclipse.jgit.JGitText; import org.eclipse.jgit.errors.LargeObjectException; import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase; import org.eclipse.jgit.junit.TestRepository; @@ -133,7 +135,9 @@ public class PackFileTest extends LocalDiskRepositoryTestCase { ol.getCachedBytes(); fail("Should have thrown LargeObjectException"); } catch (LargeObjectException tooBig) { - assertEquals(id.name(), tooBig.getMessage()); + assertEquals(MessageFormat.format( + JGitText.get().largeObjectException, id.name()), tooBig + .getMessage()); } ObjectStream in = ol.openStream(); @@ -257,7 +261,9 @@ public class PackFileTest extends LocalDiskRepositoryTestCase { ol.getCachedBytes(); fail("Should have thrown LargeObjectException"); } catch (LargeObjectException tooBig) { - assertEquals(id3.name(), tooBig.getMessage()); + assertEquals(MessageFormat.format( + JGitText.get().largeObjectException, id3.name()), tooBig + .getMessage()); } ObjectStream in = ol.openStream(); @@ -313,7 +319,9 @@ public class PackFileTest extends LocalDiskRepositoryTestCase { ol.getCachedBytes(); fail("Should have thrown LargeObjectException"); } catch (LargeObjectException tooBig) { - assertEquals(id3.name(), tooBig.getMessage()); + assertEquals(MessageFormat.format( + JGitText.get().largeObjectException, id3.name()), tooBig + .getMessage()); } ObjectStream in = ol.openStream(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/UnpackedObjectTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/UnpackedObjectTest.java index 25dfe4c239..ab7445b17b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/UnpackedObjectTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/UnpackedObjectTest.java @@ -135,7 +135,9 @@ public class UnpackedObjectTest extends LocalDiskRepositoryTestCase { ol.getCachedBytes(); fail("Should have thrown LargeObjectException"); } catch (LargeObjectException tooBig) { - assertEquals(id.name(), tooBig.getMessage()); + assertEquals(MessageFormat.format( + JGitText.get().largeObjectException, id.name()), tooBig + .getMessage()); } ObjectStream in = ol.openStream(); @@ -416,7 +418,9 @@ public class UnpackedObjectTest extends LocalDiskRepositoryTestCase { ol.getCachedBytes(); fail("Should have thrown LargeObjectException"); } catch (LargeObjectException tooBig) { - assertEquals(id.name(), tooBig.getMessage()); + assertEquals(MessageFormat.format( + JGitText.get().largeObjectException, id.name()), tooBig + .getMessage()); } ObjectStream in = ol.openStream(); |