mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-25 13:52:06 +01:00
Remove tests for armor --label
This commit is contained in:
parent
eeb5986890
commit
0b7511a223
2 changed files with 0 additions and 18 deletions
|
@ -16,7 +16,6 @@ import org.bouncycastle.openpgp.PGPSecretKeyRing;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.pgpainless.PGPainless;
|
import org.pgpainless.PGPainless;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import sop.exception.SOPGPException;
|
|
||||||
|
|
||||||
public class ArmorCmdTest extends CLITest {
|
public class ArmorCmdTest extends CLITest {
|
||||||
|
|
||||||
|
@ -89,15 +88,6 @@ public class ArmorCmdTest extends CLITest {
|
||||||
assertTrue(armored.contains("SGVsbG8sIFdvcmxkIQo="));
|
assertTrue(armored.contains("SGVsbG8sIFdvcmxkIQo="));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void labelNotYetSupported() throws IOException {
|
|
||||||
pipeStringToStdin("Hello, World!\n");
|
|
||||||
ByteArrayOutputStream out = pipeStdoutToStream();
|
|
||||||
int exitCode = executeCommand("armor", "--label", "Message");
|
|
||||||
assertEquals(SOPGPException.UnsupportedOption.EXIT_CODE, exitCode);
|
|
||||||
assertEquals(0, out.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void armorAlreadyArmoredDataIsIdempotent() throws IOException {
|
public void armorAlreadyArmoredDataIsIdempotent() throws IOException {
|
||||||
pipeStringToStdin(key);
|
pipeStringToStdin(key);
|
||||||
|
|
|
@ -7,22 +7,14 @@ package org.pgpainless.sop;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.pgpainless.PGPainless;
|
import org.pgpainless.PGPainless;
|
||||||
import org.pgpainless.util.ArmorUtils;
|
import org.pgpainless.util.ArmorUtils;
|
||||||
import sop.enums.ArmorLabel;
|
|
||||||
import sop.exception.SOPGPException;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
|
||||||
|
|
||||||
public class ArmorTest {
|
public class ArmorTest {
|
||||||
|
|
||||||
@Test
|
|
||||||
public void labelIsNotSupported() {
|
|
||||||
assertThrows(SOPGPException.UnsupportedOption.class, () -> new SOPImpl().armor().label(ArmorLabel.sig));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void armor() throws IOException {
|
public void armor() throws IOException {
|
||||||
byte[] data = PGPainless.generateKeyRing().modernKeyRing("Alice").getEncoded();
|
byte[] data = PGPainless.generateKeyRing().modernKeyRing("Alice").getEncoded();
|
||||||
|
|
Loading…
Reference in a new issue