mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 06:12:06 +01:00
Rework some tests to use MessageMetadata
This commit is contained in:
parent
39f8f89fe0
commit
8f6227c14b
3 changed files with 13 additions and 13 deletions
|
@ -62,7 +62,7 @@ public class MessageMetadataTest {
|
|||
|
||||
assertEquals("", metadata.getFilename());
|
||||
JUtils.assertDateEquals(new Date(0L), metadata.getModificationDate());
|
||||
assertEquals(StreamEncoding.BINARY, metadata.getFormat());
|
||||
assertEquals(StreamEncoding.BINARY, metadata.getLiteralDataEncoding());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -79,6 +79,6 @@ public class MessageMetadataTest {
|
|||
assertNull(metadata.getEncryptionAlgorithm());
|
||||
assertEquals("collateral_murder.zip", metadata.getFilename());
|
||||
assertEquals(DateUtil.parseUTCDate("2010-04-05 10:12:03 UTC"), metadata.getModificationDate());
|
||||
assertEquals(StreamEncoding.BINARY, metadata.getFormat());
|
||||
assertEquals(StreamEncoding.BINARY, metadata.getLiteralDataEncoding());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ public class OpenPgpMessageInputStreamTest {
|
|||
assertNull(metadata.getEncryptionAlgorithm());
|
||||
assertEquals("", metadata.getFilename());
|
||||
JUtils.assertDateEquals(new Date(0L), metadata.getModificationDate());
|
||||
assertEquals(StreamEncoding.BINARY, metadata.getFormat());
|
||||
assertEquals(StreamEncoding.BINARY, metadata.getLiteralDataEncoding());
|
||||
assertTrue(metadata.getVerifiedInlineSignatures().isEmpty());
|
||||
assertTrue(metadata.getRejectedInlineSignatures().isEmpty());
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.pgpainless.PGPainless;
|
|||
import org.pgpainless.algorithm.StreamEncoding;
|
||||
import org.pgpainless.decryption_verification.ConsumerOptions;
|
||||
import org.pgpainless.decryption_verification.DecryptionStream;
|
||||
import org.pgpainless.decryption_verification.OpenPgpMetadata;
|
||||
import org.pgpainless.decryption_verification.MessageMetadata;
|
||||
|
||||
public class FileInformationTest {
|
||||
|
||||
|
@ -80,11 +80,11 @@ public class FileInformationTest {
|
|||
|
||||
decryptionStream.close();
|
||||
|
||||
OpenPgpMetadata decResult = decryptionStream.getResult();
|
||||
MessageMetadata decResult = decryptionStream.getMetadata();
|
||||
|
||||
assertEquals(fileName, decResult.getFileName());
|
||||
assertEquals(fileName, decResult.getFilename());
|
||||
JUtils.assertDateEquals(modificationDate, decResult.getModificationDate());
|
||||
assertEquals(encoding, decResult.getFileEncoding());
|
||||
assertEquals(encoding, decResult.getLiteralDataEncoding());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -119,11 +119,11 @@ public class FileInformationTest {
|
|||
|
||||
decryptionStream.close();
|
||||
|
||||
OpenPgpMetadata decResult = decryptionStream.getResult();
|
||||
MessageMetadata decResult = decryptionStream.getMetadata();
|
||||
|
||||
assertEquals("", decResult.getFileName());
|
||||
assertEquals("", decResult.getFilename());
|
||||
JUtils.assertDateEquals(PGPLiteralData.NOW, decResult.getModificationDate());
|
||||
assertEquals(PGPLiteralData.BINARY, decResult.getFileEncoding().getCode());
|
||||
assertEquals(PGPLiteralData.BINARY, decResult.getLiteralDataEncoding().getCode());
|
||||
assertFalse(decResult.isForYourEyesOnly());
|
||||
}
|
||||
|
||||
|
@ -160,11 +160,11 @@ public class FileInformationTest {
|
|||
|
||||
decryptionStream.close();
|
||||
|
||||
OpenPgpMetadata decResult = decryptionStream.getResult();
|
||||
MessageMetadata decResult = decryptionStream.getMetadata();
|
||||
|
||||
assertEquals(PGPLiteralData.CONSOLE, decResult.getFileName());
|
||||
assertEquals(PGPLiteralData.CONSOLE, decResult.getFilename());
|
||||
JUtils.assertDateEquals(PGPLiteralData.NOW, decResult.getModificationDate());
|
||||
assertEquals(PGPLiteralData.BINARY, decResult.getFileEncoding().getCode());
|
||||
assertEquals(PGPLiteralData.BINARY, decResult.getLiteralDataEncoding().getCode());
|
||||
assertTrue(decResult.isForYourEyesOnly());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue