Class TestStatistics


  • public class TestStatistics
    extends Object
    Class that keeps track of the tests executed, including failures encountered.
    • Constructor Detail

      • TestStatistics

        public TestStatistics​(boolean stopAtFirstError)
    • Method Detail

      • incPassed

        public void incPassed()
        Increment the number of tests that have passed.
      • incIgnored

        public void incIgnored()
        Increment the number of tests that were ignored.
      • setPassed

        public void setPassed​(int n)
        Set the number of tests that have passed.
      • setFailed

        public void setFailed​(int n)
        Set the number of tests that have failed.
      • setIgnored

        public void setIgnored​(int n)
        Set the number of tests that were ignored.
      • add

        public void add​(TestStatistics stats)
        Add the other statistics to this.
      • getFailed

        public int getFailed()
        Returns:
        The number of failed tests.
      • getPassed

        public int getPassed()
        Returns:
        The number of passed tests.
      • getIgnored

        public int getIgnored()
        Returns:
        The number of ignored tests.
      • totalTests

        public int totalTests()
        Returns:
        Total number of tests that were considered.
      • printStatistics

        public void printStatistics​(PrintStream out)
        Print the statistics to the specified stream.