File tree Expand file tree Collapse file tree 3 files changed +8
-15
lines changed
src/test/java/org/hyperledger/besu/cryptoservices Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,8 @@ dependencies {
3232 api project(' :crypto:algorithms' )
3333 api project(' :plugin-api' )
3434
35- testImplementation ' junit:junit'
3635 testImplementation ' org.assertj:assertj-core'
3736 testImplementation ' org.junit.jupiter:junit-jupiter'
38-
39- testRuntimeOnly ' org.junit.vintage:junit-vintage-engine'
4037}
4138
4239artifacts { testSupportArtifacts testSupportJar }
Original file line number Diff line number Diff line change 2020import org .hyperledger .besu .crypto .SECPPublicKey ;
2121import org .hyperledger .besu .crypto .SignatureAlgorithmFactory ;
2222
23- import java .io .File ;
2423import java .io .IOException ;
24+ import java .nio .file .Path ;
2525import java .security .spec .ECPoint ;
2626
2727import org .apache .tuweni .bytes .Bytes ;
2828import org .assertj .core .api .Assertions ;
29- import org .junit .Rule ;
30- import org .junit .Test ;
31- import org .junit .rules .TemporaryFolder ;
29+ import org .junit .jupiter .api .Test ;
30+ import org .junit .jupiter .api .io .TempDir ;
3231
3332public class KeyPairSecurityModuleTest {
3433
35- @ Rule public final TemporaryFolder temp = new TemporaryFolder () ;
34+ @ TempDir public Path keyFile ;
3635
3736 @ Test
3837 public void validatePublicKeyFromECPointCanBeConstructed () throws IOException {
39- final File keyDirectory = temp .newFolder ();
40- final File keyFile = new File (keyDirectory , "key" );
41-
42- final KeyPair keyPair = KeyPairUtil .loadKeyPair (keyFile );
38+ final KeyPair keyPair = KeyPairUtil .loadKeyPair (keyFile .resolve ("key" ));
4339
4440 final KeyPairSecurityModule keyPairSecurityModule = new KeyPairSecurityModule (keyPair );
4541 final ECPoint ecPoint = keyPairSecurityModule .getPublicKey ().getW ();
Original file line number Diff line number Diff line change 2121import org .apache .tuweni .bytes .Bytes ;
2222import org .apache .tuweni .bytes .Bytes32 ;
2323import org .assertj .core .api .Assertions ;
24- import org .junit .Before ;
25- import org .junit .Test ;
24+ import org .junit .jupiter . api . BeforeEach ;
25+ import org .junit .jupiter . api . Test ;
2626
2727public class NodeKeyTest {
2828
29- @ Before
29+ @ BeforeEach
3030 public void resetInstance () {
3131 SignatureAlgorithmFactory .resetInstance ();
3232 }
You can’t perform that action at this time.
0 commit comments