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 deb799632a5653815805fdfe2e6e0346ce5a46a0 Author: Rene Cordier <[email protected]> AuthorDate: Thu Aug 13 15:42:15 2020 +0700 [Refactoring] Migrate SieveRepositoryManagementTest to JUnit5 --- .../lib/SieveRepositoryManagementTest.java | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/server/data/data-library/src/test/java/org/apache/james/sieverepository/lib/SieveRepositoryManagementTest.java b/server/data/data-library/src/test/java/org/apache/james/sieverepository/lib/SieveRepositoryManagementTest.java index 94597a4..392e370 100644 --- a/server/data/data-library/src/test/java/org/apache/james/sieverepository/lib/SieveRepositoryManagementTest.java +++ b/server/data/data-library/src/test/java/org/apache/james/sieverepository/lib/SieveRepositoryManagementTest.java @@ -29,28 +29,26 @@ import org.apache.james.core.Username; import org.apache.james.sieverepository.api.ScriptContent; import org.apache.james.sieverepository.api.ScriptName; import org.apache.james.sieverepository.api.SieveRepository; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -public class SieveRepositoryManagementTest { - +class SieveRepositoryManagementTest { @Mock - private SieveRepository sieveRepository; + SieveRepository sieveRepository; - private SieveRepositoryManagement sieveRepositoryManagement; + SieveRepositoryManagement sieveRepositoryManagement; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { MockitoAnnotations.initMocks(this); sieveRepositoryManagement = new SieveRepositoryManagement(); sieveRepositoryManagement.setSieveRepository(sieveRepository); } - @Test - public void importSieveScriptFileToRepositoryShouldStoreContentAndActivateScript() throws Exception { + void importSieveScriptFileToRepositoryShouldStoreContentAndActivateScript() throws Exception { String userName = "user@domain"; String script = "user_script"; URL sieveResource = ClassLoader.getSystemResource("sieve/my_sieve"); @@ -67,7 +65,7 @@ public class SieveRepositoryManagementTest { } @Test - public void importSieveScriptFileToRepositoryShouldNotImportFileWithWrongPathToRepistory() throws Exception { + void importSieveScriptFileToRepositoryShouldNotImportFileWithWrongPathToRepistory() throws Exception { String userName = "user@domain"; String script = "user_script"; URL sieveResource = ClassLoader.getSystemResource("sieve/my_sieve"); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
