This is an automated email from the ASF dual-hosted git repository. rcordier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 810c97e9938db5611708c26722cce28eb330c553 Author: Rene Cordier <[email protected]> AuthorDate: Fri Jul 24 14:43:20 2020 +0700 [Refactoring] Migrate GenericMailetTest to Junit 5 --- .../org/apache/mailet/base/GenericMailetTest.java | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/mailet/base/src/test/java/org/apache/mailet/base/GenericMailetTest.java b/mailet/base/src/test/java/org/apache/mailet/base/GenericMailetTest.java index a8629eb..842a310 100644 --- a/mailet/base/src/test/java/org/apache/mailet/base/GenericMailetTest.java +++ b/mailet/base/src/test/java/org/apache/mailet/base/GenericMailetTest.java @@ -24,10 +24,10 @@ import static org.assertj.core.api.Assertions.assertThat; import javax.mail.MessagingException; import org.apache.mailet.Mail; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -public class GenericMailetTest { +class GenericMailetTest { private static class TestingMailet extends GenericMailet { @@ -36,64 +36,64 @@ public class GenericMailetTest { } } - private TestingMailet testee; + TestingMailet testee; - @Before - public void setup() { + @BeforeEach + void setup() { testee = new TestingMailet(); } @Test - public void getBooleanParameterShouldReturnFalseWhenValueNullAndDefaultFalse() throws Exception { + void getBooleanParameterShouldReturnFalseWhenValueNullAndDefaultFalse() throws Exception { String value = null; boolean actual = testee.getBooleanParameter(value, false); assertThat(actual).isFalse(); } @Test - public void getBooleanParameterShouldReturnTrueWhenValueTrueAndDefaultFalse() throws Exception { + void getBooleanParameterShouldReturnTrueWhenValueTrueAndDefaultFalse() throws Exception { String value = "true"; boolean actual = testee.getBooleanParameter(value, false); assertThat(actual).isTrue(); } @Test - public void getBooleanParameterShouldReturnTrueWhenValueYesAndDefaultFalse() throws Exception { + void getBooleanParameterShouldReturnTrueWhenValueYesAndDefaultFalse() throws Exception { String value = "yes"; boolean actual = testee.getBooleanParameter(value, false); assertThat(actual).isTrue(); } @Test - public void getBooleanParameterShouldReturnFalseWhenValueOtherAndDefaultFalse() throws Exception { + void getBooleanParameterShouldReturnFalseWhenValueOtherAndDefaultFalse() throws Exception { String value = "other"; boolean actual = testee.getBooleanParameter(value, false); assertThat(actual).isFalse(); } @Test - public void getBooleanParameterShouldReturnTrueWhenValueNullAndDefaultTrue() throws Exception { + void getBooleanParameterShouldReturnTrueWhenValueNullAndDefaultTrue() throws Exception { String value = null; boolean actual = testee.getBooleanParameter(value, true); assertThat(actual).isTrue(); } @Test - public void getBooleanParameterShouldReturnFalseWhenValueNoAndDefaultTrue() throws Exception { + void getBooleanParameterShouldReturnFalseWhenValueNoAndDefaultTrue() throws Exception { String value = "no"; boolean actual = testee.getBooleanParameter(value, true); assertThat(actual).isFalse(); } @Test - public void getBooleanParameterShouldReturnFalseWhenValueFalseAndDefaultTrue() throws Exception { + void getBooleanParameterShouldReturnFalseWhenValueFalseAndDefaultTrue() throws Exception { String value = "false"; boolean actual = testee.getBooleanParameter(value, true); assertThat(actual).isFalse(); } @Test - public void getBooleanParameterShouldReturnTrueWhenValueOtherAndDefaultTrue() throws Exception { + void getBooleanParameterShouldReturnTrueWhenValueOtherAndDefaultTrue() throws Exception { String value = "other"; boolean actual = testee.getBooleanParameter(value, true); assertThat(actual).isTrue(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
