Package org.apache.hadoop.hbase
Class HBaseParameterizedTemplateProvider
java.lang.Object
org.apache.hadoop.hbase.HBaseParameterizedTemplateProvider
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
@Private
public class HBaseParameterizedTemplateProvider
extends Object
implements org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
The entry point class for supporting JUnit4 like Parameterized test, where we can use constructor
to pass parameters.
JUnit5's ParameterizedClass will create separated test classes,
which is different with JUnit4 and ParameterizedTest does not
support passing parameters through constructors.
When you want to use this provider, annotation the test class with
HBaseParameterizedTestTemplate, and provide a static method named "parameters" for
providing the arguments. The method must have no parameter, and return a Stream<Arguments>.
All the test method should be marked with TestTemplate, not
Test or ParameterizedTest.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStream<org.junit.jupiter.api.extension.TestTemplateInvocationContext>provideTestTemplateInvocationContexts(org.junit.jupiter.api.extension.ExtensionContext context) booleansupportsTestTemplate(org.junit.jupiter.api.extension.ExtensionContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
mayReturnZeroTestTemplateInvocationContexts
-
Field Details
-
PARAMETERS_METHOD_NAME
- See Also:
-
-
Constructor Details
-
HBaseParameterizedTemplateProvider
public HBaseParameterizedTemplateProvider()
-
-
Method Details
-
supportsTestTemplate
- Specified by:
supportsTestTemplatein interfaceorg.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
-
provideTestTemplateInvocationContexts
public Stream<org.junit.jupiter.api.extension.TestTemplateInvocationContext> provideTestTemplateInvocationContexts(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
provideTestTemplateInvocationContextsin interfaceorg.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
-