Enum Quality

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Error
      The execution of the testcase failed indicated by finishing with exception or error other than AssertionFailedError.
      Failure
      The execution of the testcase finished gracefully but did not succeed: At least one assertion is hurt, indicated by an AssertionFailedError.
      Ignored
      The testcase was ignored, i.e. was scheduled for execution but then decided not to start execution.
      Invalidated
      The execution of the testcase ran onto an hurt assumption before maybe running into further exceptions or errors and is thus invalidated.
      Scheduled
      The testcase is scheduled for execution but execution has not yet been started nor has it been decided to ignore, i.e. not to execute the testcase.
      Started
      The execution of the testcase started but did not finish in any way.
      Success
      The execution of the testcase finished and the test succeeded (passed): All assertions hold and no throwable has been thrown.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.awt.Color COLOR_FAIL
      Represents a failed testcase.
      private static java.awt.Color COLOR_IGNORED
      Represents an ignored testcase.
      private static java.awt.Color COLOR_OK
      Represents a testcase which did neither failed.
      private int level
      Encoding how good the result of the test is: 2 if something went wrong: Error or Failure.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Quality​(int level)
      Creates another Quality with the given level level.
    • Enum Constant Detail

      • Scheduled

        public static final Quality Scheduled
        The testcase is scheduled for execution but execution has not yet been started nor has it been decided to ignore, i.e. not to execute the testcase.
        See Also:
        Started, Ignored
      • Started

        public static final Quality Started
        The execution of the testcase started but did not finish in any way. Thus it is neither clear whether the execution succeeds nor the outcoming of the test.
      • Success

        public static final Quality Success
        The execution of the testcase finished and the test succeeded (passed): All assertions hold and no throwable has been thrown.
      • Invalidated

        public static final Quality Invalidated
        The execution of the testcase ran onto an hurt assumption before maybe running into further exceptions or errors and is thus invalidated.
      • Ignored

        public static final Quality Ignored
        The testcase was ignored, i.e. was scheduled for execution but then decided not to start execution. In particular, nothing can be said about the course of the test run.
      • Failure

        public static final Quality Failure
        The execution of the testcase finished gracefully but did not succeed: At least one assertion is hurt, indicated by an AssertionFailedError. This excludes further throwables.
      • Error

        public static final Quality Error
        The execution of the testcase failed indicated by finishing with exception or error other than AssertionFailedError. Thus there is no valid test result.
    • Field Detail

      • COLOR_FAIL

        private static final java.awt.Color COLOR_FAIL
        Represents a failed testcase.
      • COLOR_OK

        private static final java.awt.Color COLOR_OK
        Represents a testcase which did neither failed.
      • COLOR_IGNORED

        private static final java.awt.Color COLOR_IGNORED
        Represents an ignored testcase.
    • Constructor Detail

      • Quality

        private Quality​(int level)
        Creates another Quality with the given level level.
    • Method Detail

      • values

        public static Quality[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Quality c : Quality.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Quality valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getIcon

        abstract javax.swing.ImageIcon getIcon()
        Returns an icon representing this phase on the GUI.
        Returns:
        an icon representing this phase on the GUI.
      • getMessage

        abstract java.lang.String getMessage()
        Returns a status message which describes this phase.
        Returns:
        a status message which describes this phase.
      • getColor

        java.awt.Color getColor()
        Returns the color associated with this phase: If this phase represents an irregular ending testcase, COLOR_FAIL is returned. Else if this phase represents an ignored testcase, COLOR_IGNORED is returned. Else COLOR_OK is returned.
        Returns:
        the color associated with this phase.
        See Also:
        max(Quality)
      • setTime

        long setTime​(long time)
        Returns the difference of the current time in milliseconds.
        Parameters:
        time - some time in milliseconds. The details depend on this:
        Returns:
        • -1 for Scheduled.
        • -0 for Ignored.
        • The current time System.currentTimeMillis() for Started.
        • the span of time the underlying testcase took from start to finish
      • isNeutral

        boolean isNeutral()
        Returns whether the underlying testcase is neither finished unsuccessfully nor ignored. This is false except for Scheduled, Started and Success. Neutral qualities do not occur in the statistics given by GUIRunner.StatisticsTestState.
        Returns:
        whether the underlying testcase is neither finished unsuccessfully nor ignored.
      • hasFailure

        boolean hasFailure()
        Returns whether the given state is tied to a throwable.
        Returns:
        true iff this is Invalidated, Failure or Error.