chibenwa commented on a change in pull request #781:
URL: https://github.com/apache/james-project/pull/781#discussion_r766273591



##########
File path: 
server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/custom/authentication/strategy/ModularizeJmapRFC8621AuthenticationStrategyContract.java
##########
@@ -41,58 +41,29 @@
 import static org.hamcrest.Matchers.equalTo;
 import static org.jboss.netty.handler.codec.http.HttpHeaders.Names.ACCEPT;
 
-import java.io.IOException;
+import java.util.List;
 import java.util.Optional;
 
 import org.apache.james.GuiceJamesServer;
 import org.apache.james.jmap.draft.JmapGuiceProbe;
-import org.apache.james.jmap.http.AuthenticationStrategy;
-import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.utils.DataProbeImpl;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
 
 import io.restassured.RestAssured;
 import io.restassured.http.Header;
 
 public abstract class ModularizeJmapRFC8621AuthenticationStrategyContract {
-    private AllowAuthenticationStrategy allowAuthenticationStrategy;
-    private DenyAuthenticationStrategy denyAuthenticationStrategy;
-    private GuiceJamesServer jmapServer;
-
-    protected abstract GuiceJamesServer 
createJmapServerWithAllowAuthenticationStrategy(AllowAuthenticationStrategy 
authenticationStrategy) throws IOException;
-
-    protected abstract GuiceJamesServer 
createJmapServerWithDenyAuthenticationStrategy(DenyAuthenticationStrategy 
authenticationStrategy) throws IOException;
+    public static Optional<List<String>> ALLOW_AUTHENTICATION_STRATEGY = 
Optional.of(List.of(AllowAuthenticationStrategy.class.getCanonicalName()));
+    public static Optional<List<String>> DENY_AUTHENTICATION_STRATEGY = 
Optional.of(List.of(DenyAuthenticationStrategy.class.getCanonicalName()));
+    public static Optional<List<String>> DEFAULT_STRATEGIES = Optional.empty();
 
-    protected abstract GuiceJamesServer 
createJmapServerWithDefaultAuthenticationStrategies() throws IOException;
-
-    protected abstract MailboxManager initMailboxManager();
+    private GuiceJamesServer jmapServer;
 
-    @Before
-    public void setup() {
-        MailboxManager mailboxManager = initMailboxManager();
-        allowAuthenticationStrategy = new 
AllowAuthenticationStrategy(mailboxManager);
-        denyAuthenticationStrategy = new DenyAuthenticationStrategy();
-    }
+    protected abstract GuiceJamesServer createJmapServer(GuiceJamesServer 
basedServer, Optional<List<String>> authOverride);

Review comment:
       IMO memory is enough




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to