Class GenericActions<T extends AnyScenarioType,​SELF extends GenericActions<T,​SELF>>

  • Type Parameters:
    SELF - the type of the subclass
    T - type of scenario
    All Implemented Interfaces:
    ScenarioType<T>

    @ThreadSafe
    public class GenericActions<T extends AnyScenarioType,​SELF extends GenericActions<T,​SELF>>
    extends StageEx<SELF>
    implements ScenarioType<T>
    Generic actions.
    Author:
    aherscu
    • Constructor Detail

      • GenericActions

        public GenericActions()
        Logs the construction of this stage.
    • Method Detail

      • comment

        @Deprecated
        public SELF comment​(String comment)
        Deprecated.
        use ScenarioTestBase.section(String)
        Comment to be reported.
        Overrides:
        comment in class com.tngtech.jgiven.Stage<SELF extends GenericActions<T,​SELF>>
        Parameters:
        comment - comment to be added to generated report
        Returns:
        StageBase.self()
      • concatenate_$_files_from_$_into

        public SELF concatenate_$_files_from_$_into​(org.apache.commons.io.filefilter.IOFileFilter fileFilter,
                                                    File sourceDirectory,
                                                    File targetFile)
        Concatenates all files in specified source directory recursing into sub-directories.
        Parameters:
        fileFilter - a file filter
        sourceDirectory - the source directory
        targetFile - the target file into which to concatenate
        Returns:
        StageBase.self()
      • deleting_directory

        public SELF deleting_directory​(File directory)
        Deletes directory from specified path.
        Parameters:
        directory - the directory path
        Returns:
        StageBase.self()
      • doing_nothing

        public SELF doing_nothing()
        Does nothing.
        Returns:
        StageBase.self()
      • doing_nothing

        public SELF doing_nothing​(long millis)
        Does nothing for specified duration.
        Parameters:
        millis - how many milliseconds to do nothing
        Returns:
        StageBase.self()
      • doing_nothing

        @NestedSteps
        public SELF doing_nothing​(Duration duration)
        Does nothing for specified duration.
        Parameters:
        duration - the duration to do nothing
        Returns:
        StageBase.self()
      • failing_on_purpose_with

        public SELF failing_on_purpose_with​(Throwable throwable)
        Failing with specified throwable for self-testing purposes.
        Parameters:
        throwable - the throwable
        Returns:
        StageBase.self()
      • safely

        @Hidden
        public final SELF safely​(Function<SELF,​SELF> step)
        Safely executes specified step, swallowing all exceptions.

        IMPORTANT:must not be called from step method that is annotated with NestedSteps since this interferes with exception handling.

        Parameters:
        step - the step to execute
        Returns:
        StageBase.self()
      • safely

        @Hidden
        public final SELF safely​(StepWithDescription<SELF> step)
        Safely executes specified step, swallowing all exceptions.

        IMPORTANT:must not be called from step method that is annotated with NestedSteps since this interferes with exception handling.

        Parameters:
        step - the step to execute
        Returns:
        StageBase.self()