justinleet commented on a change in pull request #1554: METRON-2307: Migrate to
JUnit5
URL: https://github.com/apache/metron/pull/1554#discussion_r347037439
##########
File path:
metron-platform/metron-common/src/test/java/org/apache/metron/common/field/transformation/StellarTransformationTest.java
##########
@@ -28,39 +28,16 @@
import org.apache.metron.stellar.common.CachingStellarProcessor;
import org.apache.metron.stellar.dsl.Context;
import org.json.simple.JSONObject;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.HashMap;
+import java.util.stream.Stream;
-@RunWith(Parameterized.class)
-public class StellarTransformationTest {
- Context context;
- public StellarTransformationTest(Cache<CachingStellarProcessor.Key, Object>
cache) {
- if(cache == null) {
- context = Context.EMPTY_CONTEXT();
- }
- else {
- context = new Context.Builder().with(Context.Capabilities.CACHE, () ->
cache).build();
- }
- }
-
- @Parameterized.Parameters
Review comment:
It would, if data had actually been used by the tests. Since it wasn't, it
got dropped. Other parameterized tests use the newer setup.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services