Class AbstractSimpleProjectTest

    • Constructor Detail

      • AbstractSimpleProjectTest

        protected AbstractSimpleProjectTest​(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
      • AbstractSimpleProjectTest

        protected AbstractSimpleProjectTest​(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​(int projectId)
        Get the the key in the RunData object for the value to test.
        Parameters:
        projectId - the project Id
        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,
                               int projectId)
        Description copied from interface: ProjectTest
        Do a test.
        Parameters:
        data - result object
        projectId - the projectId
        Returns:
        a TestResult object with the result of the test
      • testIndexedRead

        protected boolean testIndexedRead()
        Test if indexed read test must return a score >=0.
        Returns:
        if indexed read must return a score