Class ParameterHandling


  • public class ParameterHandling
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String parameterSubstitution​(java.lang.String launchCommandStr)
      Scans a string for shortcuts, replacing by the appropriate string.
      • Methods inherited from class java.lang.Object

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

      • ParameterHandling

        public ParameterHandling​(Assignment asst,
                                 TestCase tc,
                                 Stage stage,
                                 Submission submission,
                                 java.io.File expected,
                                 java.io.File actual)
        Set up an object for parameter substitution .
        Parameters:
        asst - the assignment
        tc - the test case. If null, only S & R substitutions are allowed.
        stage - the stage where related code has been built
        submission - the submission being evaluated. If null, @R is not allowed.
        expected - a file of expected output. If null, @E is not allowed.
        actual - a file of actual output. If null, @A is not allowed.
    • Method Detail

      • parameterSubstitution

        public java.lang.String parameterSubstitution​(java.lang.String launchCommandStr)
        Scans a string for shortcuts, replacing by the appropriate string. Shortcuts are
        • @P the test command line parameters
        • @S the staging directory
        • @s the name/ID of the submitter
        • @T the test suite directory
        • @t the test case name
        • @R the reporting directory
        • @A a file containing the actual/observed output
        • @E a file containing the expected output
        A shortcut must be followed by a non-alphabetic character.
        Parameters:
        launchCommandStr - a string describing a command to be run
        Returns:
        the launchCommandStr with shortcuts replaced by the appropriate path/value