mirror of
https://codeberg.org/PGPainless/wkd-java.git
synced 2024-11-22 07:12:05 +01:00
Fix checkstyle issues
This commit is contained in:
parent
3af16baa20
commit
661c870d1a
3 changed files with 28 additions and 21 deletions
|
@ -6,10 +6,7 @@ package pgp.wkd.cli.test_suite;
|
|||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.DynamicTest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestFactory;
|
||||
import org.junit.platform.commons.logging.Logger;
|
||||
import org.junit.platform.commons.logging.LoggerFactory;
|
||||
import pgp.wkd.cli.WKDCLI;
|
||||
import pgp.wkd.cli.command.Fetch;
|
||||
import pgp.wkd.test_suite.TestCase;
|
||||
|
@ -26,7 +23,6 @@ import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
|||
|
||||
public class TestSuiteTestRunner {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TestSuiteTestRunner.class);
|
||||
private static TestSuite suite;
|
||||
|
||||
@BeforeAll
|
||||
|
@ -49,22 +45,23 @@ public class TestSuiteTestRunner {
|
|||
public Iterable<DynamicTest> testsFromTestSuite() {
|
||||
return suite.getTestCases()
|
||||
.stream()
|
||||
.map(testCase -> DynamicTest.dynamicTest(
|
||||
testCase.getTestTitle(),
|
||||
() -> {
|
||||
String mail = testCase.getLookupMailAddress();
|
||||
|
||||
int exitCode = WKDCLI.execute(new String[] {
|
||||
"fetch", "--armor", mail
|
||||
});
|
||||
|
||||
if (testCase.isExpectSuccess()) {
|
||||
assertEquals(0, exitCode, testCase.getTestDescription());
|
||||
} else {
|
||||
assertNotEquals(0, exitCode, testCase.getTestDescription());
|
||||
}
|
||||
}
|
||||
))
|
||||
.map(TestSuiteTestRunner::toDynamicTest)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static DynamicTest toDynamicTest(TestCase testCase) {
|
||||
return DynamicTest.dynamicTest(testCase.getTestTitle(), () -> {
|
||||
|
||||
String mail = testCase.getLookupMailAddress();
|
||||
int exitCode = WKDCLI.execute(new String[] {
|
||||
"fetch", "--armor", mail
|
||||
});
|
||||
|
||||
if (testCase.isExpectSuccess()) {
|
||||
assertEquals(0, exitCode, testCase.getTestDescription());
|
||||
} else {
|
||||
assertNotEquals(0, exitCode, testCase.getTestDescription());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
10
wkd-java/src/main/java/pgp/wkd/discovery/package-info.java
Normal file
10
wkd-java/src/main/java/pgp/wkd/discovery/package-info.java
Normal file
|
@ -0,0 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/**
|
||||
* Classes related to the certificate discovery part of the WKD spec.
|
||||
*
|
||||
* @see <a href="https://datatracker.ietf.org/doc/draft-koch-openpgp-webkey-service/">OpenPGP Web Key Directory</a>
|
||||
*/
|
||||
package pgp.wkd.discovery;
|
Loading…
Reference in a new issue