migrate to junit5 (#5573)

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
This commit is contained in:
Sally MacFarlane
2023-06-09 15:44:35 +10:00
committed by GitHub
parent 46009213b1
commit 479530dbcc
8 changed files with 21 additions and 22 deletions

View File

@@ -35,7 +35,6 @@ dependencies {
implementation 'info.picocli:picocli'
testImplementation 'com.google.errorprone:error_prone_test_helpers'
testImplementation 'junit:junit'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter'

View File

@@ -15,14 +15,14 @@
package org.hyperledger.errorpronechecks;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class BannedMethodTest {
private CompilationTestHelper compilationHelper;
@Before
@BeforeEach
public void setup() {
compilationHelper = CompilationTestHelper.newInstance(BannedMethod.class, getClass());
}

View File

@@ -15,14 +15,14 @@
package org.hyperledger.errorpronechecks;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class DoNotCreateSecureRandomDirectlyTest {
private CompilationTestHelper compilationHelper;
@Before
@BeforeEach
public void setup() {
compilationHelper =
CompilationTestHelper.newInstance(DoNotCreateSecureRandomDirectly.class, getClass());

View File

@@ -15,14 +15,14 @@
package org.hyperledger.errorpronechecks;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class DoNotInvokeMessageDigestDirectlyTest {
private CompilationTestHelper compilationHelper;
@Before
@BeforeEach
public void setup() {
compilationHelper =
CompilationTestHelper.newInstance(DoNotInvokeMessageDigestDirectly.class, getClass());

View File

@@ -15,14 +15,14 @@
package org.hyperledger.errorpronechecks;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class DoNotReturnNullOptionalsTest {
private CompilationTestHelper compilationHelper;
@Before
@BeforeEach
public void setup() {
compilationHelper =
CompilationTestHelper.newInstance(DoNotReturnNullOptionals.class, getClass());

View File

@@ -15,14 +15,14 @@
package org.hyperledger.errorpronechecks;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class ExperimentalCliOptionMustBeCorrectlyDisplayedTest {
private CompilationTestHelper compilationHelper;
@Before
@BeforeEach
public void setup() {
compilationHelper =
CompilationTestHelper.newInstance(

View File

@@ -15,14 +15,14 @@
package org.hyperledger.errorpronechecks;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class MethodInputParametersMustBeFinalTest {
private CompilationTestHelper compilationHelper;
@Before
@BeforeEach
public void setup() {
compilationHelper =
CompilationTestHelper.newInstance(MethodInputParametersMustBeFinal.class, getClass());

View File

@@ -15,14 +15,14 @@
package org.hyperledger.errorpronechecks;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class PrivateStaticFinalLoggersTest {
private CompilationTestHelper compilationHelper;
@Before
@BeforeEach
public void setup() {
compilationHelper =
CompilationTestHelper.newInstance(PrivateStaticFinalLoggers.class, getClass());