diff options
| author | Jaikiran Pai <jaikiran@apache.org> | 2018-08-16 16:31:42 +0530 |
|---|---|---|
| committer | Jaikiran Pai <jaikiran@apache.org> | 2018-08-16 16:31:42 +0530 |
| commit | 41e6b2c7ee45bf308d467055711172bfffdf8a01 (patch) | |
| tree | 4f9bb54de28fdc7c39f563f82712e0f9888d0207 /src/tests | |
| parent | 27aa22a82a216d133aa1b635631825f520bc165c (diff) | |
| download | ant-41e6b2c7ee45bf308d467055711172bfffdf8a01.tar.gz | |
Update the EmailTaskTest to ensure that the mail task does indeed fail in expected cases
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
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 a77fc92db..200ebacbd 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")) { |
