Class AbstractSimpleGlobalTest

    • Constructor Detail

      • AbstractSimpleGlobalTest

        protected AbstractSimpleGlobalTest​(String name,
                                           String description,
                                           String columnName)
        Constructor that set the field of this abstract test.
        Parameters:
        name - name of the test
        description - description of the test
        columnName - column name of the test
      • AbstractSimpleGlobalTest

        protected AbstractSimpleGlobalTest​(String name,
                                           String description,
                                           String columnName,
                                           String unit)
        Constructor that set the field of this abstract test.
        Parameters:
        name - name of the test
        description - description of the test
        columnName - column name of the test
        unit - unit of the test
    • Method Detail

      • getKey

        protected abstract String getKey()
        Get the the key in the RunData object for the value to test.
        Returns:
        a String with the required key
      • transformValue

        protected Number transformValue​(Number value,
                                        RunData data)
        Transform the value.
        Parameters:
        value - value to transform
        data - run data
        Returns:
        the transformed value
      • isValuePercent

        protected boolean isValuePercent()
        Test if the value is a percent.
        Returns:
        true if the value is a percent
      • getValueType

        protected abstract Class<?> getValueType()
        Get the type of the value.
        Returns:
        a Class object with the type
      • test

        public TestResult test​(RunData data)
        Description copied from interface: GlobalTest
        Do a test.
        Parameters:
        data - result object
        Returns:
        a TestResult object with the result of the test