NIFI-9165 Converted remaining nifi-standard-bundle tests from JUnit 4 to JUnit 5

This closes #6696

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
dan-s1 2022-11-21 21:35:00 +00:00 committed by exceptionfactory
parent 620b7365c2
commit f3d2dfaf5c
No known key found for this signature in database
GPG Key ID: 29B6A52D2AAE8DBA
5 changed files with 13 additions and 13 deletions

View File

@ -22,8 +22,8 @@ import org.apache.nifi.logging.ComponentLog;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.MockConfigurationContext;
import org.apache.nifi.util.MockParameterProviderInitializationContext;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import org.mockito.ArgumentMatchers;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
@ -42,10 +42,10 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doAnswer;
@ -67,7 +67,7 @@ public class TestDatabaseParameterProvider {
private Map<PropertyDescriptor, String> nonColumnBasedProperties;
@Before
@BeforeEach
public void init() throws InitializationException {
dbcpService = mock(DBCPService.class);

View File

@ -48,7 +48,7 @@ import java.util.Optional;
import java.util.UUID;
import java.util.function.Consumer;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
public abstract class AbstractConversionIT {
protected RecordReaderFactory reader;

View File

@ -25,7 +25,7 @@ import org.bouncycastle.openpgp.PGPEncryptedData;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
public class OpenPGPKeyBasedEncryptorTest {
private static final String FILENAME = OpenPGPKeyBasedEncryptorTest.class.getSimpleName();

View File

@ -17,13 +17,13 @@
package org.apache.nifi.controller;
import org.apache.nifi.logging.ComponentLog;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import java.nio.file.Paths;
import java.util.concurrent.atomic.AtomicInteger;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class TestMonitorDiskUsage {

View File

@ -24,7 +24,7 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import org.apache.nifi.processors.standard.util.jolt.TransformFactory;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import com.bazaarvoice.jolt.CardinalityTransform;
import com.bazaarvoice.jolt.Chainr;
@ -36,7 +36,7 @@ import com.bazaarvoice.jolt.Removr;
import com.bazaarvoice.jolt.Shiftr;
import com.bazaarvoice.jolt.Sortr;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class TestTransformFactory {