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 ro...@apache.org on 2020/06/08 13:16:08 UTC

[james-project] 14/30: JAMES-3179 Use a Consumer instead of a Function in FakeSmtp

This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit c3c598ff8d2091283f78d3a25bf26038a6e3e0e7
Author: Gautier DI FOLCO <gd...@linagora.com>
AuthorDate: Tue May 12 15:42:09 2020 +0200

    JAMES-3179 Use a Consumer instead of a Function in FakeSmtp
---
 server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java b/server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java
index d6a2d1c..89c15d1 100644
--- a/server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java
+++ b/server/testing/src/main/java/org/apache/james/utils/FakeSmtp.java
@@ -25,7 +25,7 @@ import static io.restassured.config.RestAssuredConfig.newConfig;
 
 import java.nio.charset.StandardCharsets;
 import java.time.Duration;
-import java.util.function.Function;
+import java.util.function.Consumer;
 
 import org.apache.james.util.docker.DockerContainer;
 import org.apache.james.util.docker.Images;
@@ -89,8 +89,8 @@ public class FakeSmtp implements TestRule {
         return container.apply(statement, description);
     }
 
-    public void assertEmailReceived(Function<ValidatableResponse, ValidatableResponse> expectations) {
-        expectations.apply(
+    public void assertEmailReceived(Consumer<ValidatableResponse> expectations) {
+        expectations.accept(
             given(requestSpecification(), RESPONSE_SPECIFICATION)
                 .get("/api/email")
             .then()


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