You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/12/12 02:18:57 UTC
[james-project] 13/15: [Refactoring] Move
ContentTypeFilteringTextExtractorTest to JUnit 5
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 5930a3ba008f2a39169b09770c030cb4db8817c4
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Tue Dec 10 10:41:30 2019 +0700
[Refactoring] Move ContentTypeFilteringTextExtractorTest to JUnit 5
---
.../tika/ContentTypeFilteringTextExtractorTest.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/ContentTypeFilteringTextExtractorTest.java b/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/ContentTypeFilteringTextExtractorTest.java
index 95e838f..ebea68c 100644
--- a/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/ContentTypeFilteringTextExtractorTest.java
+++ b/mailbox/tika/src/test/java/org/apache/james/mailbox/tika/ContentTypeFilteringTextExtractorTest.java
@@ -31,25 +31,25 @@ import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
import org.apache.james.mailbox.extractor.ParsedContent;
import org.apache.james.mailbox.extractor.TextExtractor;
-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;
import com.google.common.collect.ImmutableSet;
-public class ContentTypeFilteringTextExtractorTest {
+class ContentTypeFilteringTextExtractorTest {
@Mock
TextExtractor textExtractor;
- @Before
- public void setUp() {
+ @BeforeEach
+ void setUp() {
MockitoAnnotations.initMocks(this);
}
@Test
- public void extractContentReturnEmptyWithContentTypeInBlacklist() throws Exception {
+ void extractContentReturnEmptyWithContentTypeInBlacklist() throws Exception {
ContentTypeFilteringTextExtractor contentTypeFilteringTextExtractor =
new ContentTypeFilteringTextExtractor(textExtractor,
ImmutableSet.of("application/ics", "application/zip"));
@@ -61,7 +61,7 @@ public class ContentTypeFilteringTextExtractorTest {
}
@Test
- public void extractContentCallUnderlyingWithContentTypeNotInBlacklist() throws Exception {
+ void extractContentCallUnderlyingWithContentTypeNotInBlacklist() throws Exception {
InputStream inputStream = ClassLoader.getSystemResourceAsStream("documents/Text.txt");
ContentTypeFilteringTextExtractor contentTypeFilteringTextExtractor =
new ContentTypeFilteringTextExtractor(textExtractor,
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org