Class Actions


  • public final class Actions
    extends Object
    Represents the actions of the test GUI inspired by old junit GUI. **** Moreover provides a wrapper to access junit and the access point to run the gui started from the class to be tested. **** The fundamental methods are runFromMain() which runs the test class from its main method and runTestClass(String) which runs a testclass with the given name.
    Version:
    1.0
    Author:
    Ernst Reissner
    See Also:
    GUIRunner, Created: Tue Jun 13 02:53:06 2006
    • Constructor Detail

      • Actions

        public Actions​(String testClassName)
        Creates a new Actions instance.
        Parameters:
        testClassName - the name of the test class.
    • Method Detail

      • desc2filter

        public static Filter desc2filter​(Description desiredDesc)
        Returns a Filter that only runs methods in desiredDesc.
        Parameters:
        desiredDesc - a description of the tests to be run.
        Returns:
        a Filter that only runs methods in desiredDesc.
      • runTestClass

        static void runTestClass​(String testClassName)
        The fundamental method to start tests with the underlying JUnit-GUI. The test class is supposed to define a method main with body Actions.run(<testclass>.class);.
        Parameters:
        testClassName - the name of the test class to represent and run.
        See Also:
        JUnitSingleTester, runFromMain()
      • runFromMain

        public static void runFromMain()
        The fundamental method to start tests with the underlying JUnit-GUI. The test class is supposed to define a method main with body Actions.runFromMain();. Essentially invokes runTestClass(String) with the proper test class name.
      • setFilter

        void setFilter​(Description filter)
        Sets filter according to filter.
        Parameters:
        filter - the filter for the tests to be run
      • setEnableForRun

        void setEnableForRun​(boolean isRunning)
        Updates the action-enablements depending on whether a test is running or not: Open and Start action are enabled iff no test is running, whereas stop and break actions are enabled iff some test is running.
        Parameters:
        isRunning - whether a test is running.
      • main

        public static void main​(String[] args)