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 "ASF GitHub Bot (Jira)" <se...@james.apache.org> on 2021/01/07 04:44:00 UTC

[jira] [Commented] (JAMES-2453) How to: Using Embedded James SMTP server in unit tests

    [ https://issues.apache.org/jira/browse/JAMES-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260228#comment-17260228 ] 

ASF GitHub Bot commented on JAMES-2453:
---------------------------------------

Arsnael commented on a change in pull request #284:
URL: https://github.com/apache/james-project/pull/284#discussion_r553105883



##########
File path: third-party/spamassassin/src/test/java/org/apache/james/spamassassin/mock/MockSpamdExtension.java
##########
@@ -23,25 +23,29 @@
 import java.util.concurrent.Executors;
 
 import org.apache.james.util.concurrent.NamedThreadFactory;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.rules.ExternalResource;
 
-public class MockSpamdTestRule extends ExternalResource {
+public class MockSpamdExtension implements AfterEachCallback, BeforeEachCallback {

Review comment:
       Not this one, it's an extension declaration that is used in other Test classes `SpamAssassinTest` and `SpamAssassinHandlerTest` :) 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> How to: Using Embedded James SMTP server in unit tests
> ------------------------------------------------------
>
>                 Key: JAMES-2453
>                 URL: https://issues.apache.org/jira/browse/JAMES-2453
>             Project: James Server
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Benoit Tellier
>            Priority: Major
>              Labels: how-to
>
> Write a tutorial on top of [https://github.com/linagora/james-project/pull/1493] to explain how to use James in unit tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org