Class TableNameTestExtension

java.lang.Object
org.apache.hadoop.hbase.TableNameTestExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension

public class TableNameTestExtension extends Object implements org.junit.jupiter.api.extension.BeforeEachCallback
Returns a TableName based on currently running test method name.
  • Field Details

    • tableName

      private org.apache.hadoop.hbase.TableName tableName
  • Constructor Details

  • Method Details

    • cleanUpTestName

      public static String cleanUpTestName(String methodName)
      Helper to handle parameterized method names. Unlike regular test methods, parameterized method names look like 'foo[x]'. This is problematic for tests that use this name for HBase tables. This helper strips out the parameter suffixes.
      Returns:
      current test method name without parameterized suffixes.
    • getTableName

      public org.apache.hadoop.hbase.TableName getTableName()
    • beforeEach

      public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
      Specified by:
      beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback