You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by ma...@apache.org on 2023/02/03 12:32:18 UTC
[james-project] 04/05: Ensure `TextExtractor`s `applicable` method handle null correctly
This is an automated email from the ASF dual-hosted git repository.
matthieu pushed a commit to branch refactorings-2
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit cc65d9e7ccd5a3607a3e4b8afe8ce9904ff7e905
Author: Matthieu Baechler <ma...@baechler-craftsmanship.fr>
AuthorDate: Fri Feb 3 09:13:21 2023 +0100
Ensure `TextExtractor`s `applicable` method handle null correctly
---
.../org/apache/james/mailbox/extractor/TextExtractorContract.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/extractor/TextExtractorContract.java b/mailbox/api/src/test/java/org/apache/james/mailbox/extractor/TextExtractorContract.java
index 2820744e14..01ad138416 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/extractor/TextExtractorContract.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/extractor/TextExtractorContract.java
@@ -25,6 +25,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchException;
import static org.mockito.Mockito.*;
@@ -74,4 +75,9 @@ public interface TextExtractorContract {
verify(stream).close();
}
+
+ @Test
+ default void applicableShouldReturnFalseOnNull() {
+ assertThat(testee().applicable(null)).isFalse();
+ }
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org