You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/07/02 16:18:17 UTC

[GitHub] [camel] zbendhiba opened a new pull request #3970: remove deprecated Exchange.getOut from camel-mail

zbendhiba opened a new pull request #3970:
URL: https://github.com/apache/camel/pull/3970


   removing deprecated getOut method on camel-mail component.
   I did some cleaning in test classes, like removing the deprecated  Assert.asserThat


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



[GitHub] [camel] aldettinger commented on a change in pull request #3970: remove deprecated Exchange.getOut from camel-mail

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3970:
URL: https://github.com/apache/camel/pull/3970#discussion_r449140756



##########
File path: components/camel-mail/src/test/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormatTest.java
##########
@@ -261,9 +257,10 @@ public void marhsalOnlyMixed() throws IOException {
         headers.put("X-AdditionalData", "additional data");
         addAttachment("application/octet-stream", "foobar", "attachment.bin", headers);
         Exchange result = template.send("direct:marshalonlymixed", exchange);
-        assertThat(result.getOut().getHeader("Content-Type", String.class), startsWith("multipart/mixed"));
-        String resultBody = result.getOut().getBody(String.class);
-        assertThat(resultBody, containsString("Content-Description: Sample Attachment Data"));
+        assertTrue(result.getMessage().getHeader("Content-Type", String.class).startsWith("multipart/mixed"));
+        //assertThat(result.getMessage().getHeader("Content-Type", String.class), startsWith("multipart/mixed"));

Review comment:
       I would remove this comment




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



[GitHub] [camel] zbendhiba commented on a change in pull request #3970: remove deprecated Exchange.getOut from camel-mail

Posted by GitBox <gi...@apache.org>.
zbendhiba commented on a change in pull request #3970:
URL: https://github.com/apache/camel/pull/3970#discussion_r449416456



##########
File path: components/camel-mail/src/test/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormatTest.java
##########
@@ -261,9 +257,10 @@ public void marhsalOnlyMixed() throws IOException {
         headers.put("X-AdditionalData", "additional data");
         addAttachment("application/octet-stream", "foobar", "attachment.bin", headers);
         Exchange result = template.send("direct:marshalonlymixed", exchange);
-        assertThat(result.getOut().getHeader("Content-Type", String.class), startsWith("multipart/mixed"));
-        String resultBody = result.getOut().getBody(String.class);
-        assertThat(resultBody, containsString("Content-Description: Sample Attachment Data"));
+        assertTrue(result.getMessage().getHeader("Content-Type", String.class).startsWith("multipart/mixed"));
+        //assertThat(result.getMessage().getHeader("Content-Type", String.class), startsWith("multipart/mixed"));

Review comment:
       done !!




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



[GitHub] [camel] aldettinger merged pull request #3970: remove deprecated Exchange.getOut from camel-mail

Posted by GitBox <gi...@apache.org>.
aldettinger merged pull request #3970:
URL: https://github.com/apache/camel/pull/3970


   


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



[GitHub] [camel] zbendhiba commented on a change in pull request #3970: remove deprecated Exchange.getOut from camel-mail

Posted by GitBox <gi...@apache.org>.
zbendhiba commented on a change in pull request #3970:
URL: https://github.com/apache/camel/pull/3970#discussion_r449409486



##########
File path: components/camel-mail/src/test/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormatTest.java
##########
@@ -261,9 +257,10 @@ public void marhsalOnlyMixed() throws IOException {
         headers.put("X-AdditionalData", "additional data");
         addAttachment("application/octet-stream", "foobar", "attachment.bin", headers);
         Exchange result = template.send("direct:marshalonlymixed", exchange);
-        assertThat(result.getOut().getHeader("Content-Type", String.class), startsWith("multipart/mixed"));
-        String resultBody = result.getOut().getBody(String.class);
-        assertThat(resultBody, containsString("Content-Description: Sample Attachment Data"));
+        assertTrue(result.getMessage().getHeader("Content-Type", String.class).startsWith("multipart/mixed"));
+        //assertThat(result.getMessage().getHeader("Content-Type", String.class), startsWith("multipart/mixed"));

Review comment:
       yes. I forgot that one !!




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



[GitHub] [camel] aldettinger commented on a change in pull request #3970: remove deprecated Exchange.getOut from camel-mail

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3970:
URL: https://github.com/apache/camel/pull/3970#discussion_r449423264



##########
File path: components/camel-mail/src/test/java/org/apache/camel/dataformat/mime/multipart/MimeMultipartDataFormatTest.java
##########
@@ -261,9 +257,10 @@ public void marhsalOnlyMixed() throws IOException {
         headers.put("X-AdditionalData", "additional data");
         addAttachment("application/octet-stream", "foobar", "attachment.bin", headers);
         Exchange result = template.send("direct:marshalonlymixed", exchange);
-        assertThat(result.getOut().getHeader("Content-Type", String.class), startsWith("multipart/mixed"));
-        String resultBody = result.getOut().getBody(String.class);
-        assertThat(resultBody, containsString("Content-Description: Sample Attachment Data"));
+        assertTrue(result.getMessage().getHeader("Content-Type", String.class).startsWith("multipart/mixed"));
+        //assertThat(result.getMessage().getHeader("Content-Type", String.class), startsWith("multipart/mixed"));

Review comment:
       Well done @zbendhiba, it's rebased and pushed upstream now :)




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