From c46452ecdb6f780a3b747dc13f792d905a64521f Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Fri, 15 Sep 2017 14:41:00 +0200 Subject: [PATCH] get rid of inline assignments --- .../com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/k9mail/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java b/k9mail/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java index 3149d23c1..dd97caabf 100644 --- a/k9mail/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java +++ b/k9mail/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java @@ -188,10 +188,10 @@ public class MessageCryptoHelperTest { @Test public void multipartSigned__shouldCallOpenPgpApiAsync() throws Exception { - BodyPart signedBodyPart; + BodyPart signedBodyPart = spy(bodypart("text/plain", "content")); Message message = messageFromBody( multipart("signed", "protocol=\"application/pgp-signature\"", - signedBodyPart = spy(bodypart("text/plain", "content")), + signedBodyPart, bodypart("application/pgp-signature", "content") ) ); @@ -242,11 +242,11 @@ public class MessageCryptoHelperTest { @Test public void multipartEncrypted__shouldCallOpenPgpApiAsync() throws Exception { - Body encryptedBody; + Body encryptedBody = spy(new TextBody("encrypted data")); Message message = messageFromBody( multipart("encrypted", "protocol=\"application/pgp-encrypted\"", bodypart("application/pgp-encrypted", "content"), - bodypart("application/octet-stream", encryptedBody = spy(new TextBody("encrypted data"))) + bodypart("application/octet-stream", encryptedBody) ) ); message.setFrom(Address.parse("Test ")[0]);