Class TestSuite

  • All Implemented Interfaces:
    Testable

    public class TestSuite
    extends java.lang.Object
    implements Testable
    A collection of tests organized in a hierarchical structure.
    • Constructor Summary

      Constructors 
      Constructor Description
      TestSuite​(java.lang.String name, java.nio.file.Path dir, Test defaults)  
      TestSuite​(java.lang.String name, java.nio.file.Path dir, Test defaults, java.util.List<? extends Testable> tests)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int count()
      Returns the total number of tests that are included directly or indirectly in this suite.
      Test defaults()
      Return she default settings that wil lbe used for running the tests.
      java.nio.file.Path dir()
      Return she base directory associated with this test suite.
      java.lang.String name()
      Returns the name of the test.
      void test​(java.util.function.Consumer<Test> tester)
      Runs the tester function on every test included in the testable.
      java.util.List<Testable> tests()
      Returns the list of testables that are directly included in this suite.
      java.lang.String toString()  
      java.lang.String toString​(java.lang.String indent)
      Returns an indented serialization of this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TestSuite

        public TestSuite​(java.lang.String name,
                         java.nio.file.Path dir,
                         Test defaults)
      • TestSuite

        public TestSuite​(java.lang.String name,
                         java.nio.file.Path dir,
                         Test defaults,
                         java.util.List<? extends Testable> tests)
    • Method Detail

      • count

        public int count()
        Returns the total number of tests that are included directly or indirectly in this suite.
      • name

        public java.lang.String name()
        Description copied from interface: Testable
        Returns the name of the test.
        Specified by:
        name in interface Testable
      • dir

        public java.nio.file.Path dir()
        Return she base directory associated with this test suite. This base directory is used to resolve Test.queryFile() and Test.resultFile().
      • defaults

        public Test defaults()
        Return she default settings that wil lbe used for running the tests. The value of any test attribute not defined in the actual test will be looked up from these defaults.
      • tests

        public java.util.List<Testable> tests()
        Returns the list of testables that are directly included in this suite. The returned list might contain suites that have further tests in them.
      • test

        public void test​(java.util.function.Consumer<Test> tester)
        Description copied from interface: Testable
        Runs the tester function on every test included in the testable.
        Specified by:
        test in interface Testable
      • toString

        public java.lang.String toString​(java.lang.String indent)
        Description copied from interface: Testable
        Returns an indented serialization of this object.
        Specified by:
        toString in interface Testable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object