NIFI-11030 refactor nifi-stateless-processor-bundle to use JUnit5

This closes #6837

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
Nissim Shiman 2023-01-06 19:27:58 +00:00 committed by exceptionfactory
parent fbb74b2c21
commit 74e0a2002e
No known key found for this signature in database
GPG Key ID: 29B6A52D2AAE8DBA
2 changed files with 11 additions and 11 deletions

View File

@ -22,15 +22,15 @@ import org.apache.nifi.util.MockComponentLog;
import org.apache.nifi.util.MockFlowFile;
import org.apache.nifi.util.TestRunner;
import org.apache.nifi.util.TestRunners;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class TestExecuteStateless {
private static final String HELLO_WORLD = "Hello World";
@ -39,7 +39,7 @@ public class TestExecuteStateless {
private TestRunner runner;
@Before
@BeforeEach
public void setup() {
runner = TestRunners.newTestRunner(ExecuteStateless.class);
runner.setProperty(ExecuteStateless.DATAFLOW_SPECIFICATION_STRATEGY, ExecuteStateless.SPEC_FROM_FILE);

View File

@ -23,18 +23,18 @@ import org.apache.nifi.logging.ComponentLog;
import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processors.stateless.ExecuteStateless;
import org.apache.nifi.registry.flow.VersionedFlowSnapshot;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import java.io.File;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
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.assertNotNull;
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.Mockito.doAnswer;
import static org.mockito.Mockito.mock;