diff options
author | Shawn Pearce <sop@google.com> | 2012-10-25 17:19:15 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2012-10-25 17:19:15 -0400 |
commit | cd61e85fa1c78b2f0f9d62fb7bb785cc7af45c4b (patch) | |
tree | f7176e313fd7c480a5fa8e7228469eeb1a0b7015 /org.eclipse.jgit.test/tst/org/eclipse/jgit/lib | |
parent | 88eb017c6c6fb8837dc60219dcf513b2407404b7 (diff) | |
parent | 6dadc801bdd8e2715e7351f1279ef3b3d59763cc (diff) | |
download | jgit-cd61e85fa1c78b2f0f9d62fb7bb785cc7af45c4b.tar.gz jgit-cd61e85fa1c78b2f0f9d62fb7bb785cc7af45c4b.zip |
Merge "Don't allow null name or e-mail in PersonIdent"
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/lib')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java index 34a557bd92..1b7276bf77 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdentTest.java @@ -73,4 +73,14 @@ public class T0001_PersonIdentTest { assertEquals("A U Thor <author@example.com> 1142878501 +0230", p.toExternalString()); } + + @Test(expected = IllegalArgumentException.class) + public void nullForNameShouldThrowIllegalArgumentException() { + new PersonIdent(null, "author@example.com"); + } + + @Test(expected = IllegalArgumentException.class) + public void nullForEmailShouldThrowIllegalArgumentException() { + new PersonIdent("A U Thor", null); + } } |