Skip to content

Commit

Permalink
Upgrade test to junit jupiter
Browse files Browse the repository at this point in the history
  • Loading branch information
hierynomus committed Jul 18, 2023
1 parent 9264840 commit a28adf2
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,31 @@
package net.schmizz.sshj;

import net.schmizz.sshj.common.SecurityUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.jupiter.api.Assertions.assertFalse;

import java.security.Provider;
import java.security.Security;
import java.util.Arrays;
import java.util.Optional;

import static org.junit.Assert.assertFalse;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

public class DefaultSecurityProviderConfigTest {

private static Provider bouncyCastleProvider;

@BeforeClass
@BeforeAll
public static void removeProviders() {
bouncyCastleProvider = Security.getProvider(SecurityUtils.BOUNCY_CASTLE);
if (bouncyCastleProvider != null) {
Security.removeProvider(SecurityUtils.BOUNCY_CASTLE);
}
}

@AfterClass
@AfterAll
public static void addProviders() {
if (bouncyCastleProvider != null) {
Security.addProvider(bouncyCastleProvider);
Expand Down

0 comments on commit a28adf2

Please sign in to comment.