Repository: ant Updated Branches: refs/heads/1.9.x 27aa22a82 -> 41e6b2c7e
Update the EmailTaskTest to ensure that the mail task does indeed fail in expected cases Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/41e6b2c7 Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/41e6b2c7 Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/41e6b2c7 Branch: refs/heads/1.9.x Commit: 41e6b2c7ee45bf308d467055711172bfffdf8a01 Parents: 27aa22a Author: Jaikiran Pai <[email protected]> Authored: Thu Aug 16 16:31:42 2018 +0530 Committer: Jaikiran Pai <[email protected]> Committed: Thu Aug 16 16:31:42 2018 +0530 ---------------------------------------------------------------------- .../junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/41e6b2c7/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java index a77fc92..200ebac 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java @@ -47,6 +47,7 @@ public class EmailTaskTest { public void test1() { try { buildRule.executeTarget("test1"); + Assert.fail("Execution of mail task was expected to fail"); } catch (BuildException e) { // assert it's the expected one if (!e.getMessage().equals("SMTP auth only possible with MIME mail")) { @@ -62,6 +63,7 @@ public class EmailTaskTest { public void test2() { try { buildRule.executeTarget("test2"); + Assert.fail("Execution of mail task was expected to fail"); } catch (BuildException e) { // assert it's the expected one if (!e.getMessage().equals("SSL and STARTTLS only possible with MIME mail")) {
