Class TestCaseProperties

    • Field Detail

      • name

        public java.lang.String name
        Identifies this test case.
      • grading

        public java.util.List<OracleProperties> grading
        The grading criteria for this test case.
      • onFail

        public java.util.List<java.lang.String> onFail
        What tags should be activated if this case fails (score < 100)
      • onSuccess

        public java.util.List<java.lang.String> onSuccess
        What tags should be activated if this case succeeds (score == 100)
    • Constructor Detail

      • TestCaseProperties

        public TestCaseProperties​(Assignment asst,
                                  java.lang.String testName)
                           throws TestConfigurationError
        Create a test case directory based upon information in testDirectory and in the assignment directory above it.
        Parameters:
        asst - an assignment
        testName - name of this test case. Must match a subdirectory of the test suite.
        Throws:
        FileNotFoundException - if the assignment's test suite directory does not exist or does not contain a subdirectory matching testName
        TestConfigurationError
      • TestCaseProperties

        public TestCaseProperties()
        Create an empty properties set.
    • Method Detail

      • toString

        public java.lang.String toString()
        Render as a string (YAML).
        Overrides:
        toString in class java.lang.Object
      • getExpected

        public java.lang.String getExpected()
        The expected output from the program.
        Returns:
        the expected output
      • getIn

        public java.lang.String getIn()
        The standard input for the program.
        Returns:
        the input path
      • getParams

        public java.lang.String getParams()
        Returns:
        command line parameters for running the test case.
      • getTestCaseDirectory

        public java.nio.file.Path getTestCaseDirectory()
        Returns:
        the location of the test case information
      • getStagingDirectory

        public java.nio.file.Path getStagingDirectory()
        Returns:
        Directory in which a submission will be compiled and tested.
      • getRecordingDirectory

        public java.nio.file.Path getRecordingDirectory()
        Returns:
        Where to place information about the points earned for passing tests.
      • getTestSuiteDirectory

        public java.nio.file.Path getTestSuiteDirectory()
        Returns:
        Collection of all test cases.
      • getGradingOptions

        public java.lang.Iterable<OracleProperties> getGradingOptions()
        Permits iteration over the grading options specified for this test case.
        Returns:
        iterable over OracleProperties
      • getAssignment

        public Assignment getAssignment()
        Returns:
        the assignment settings
      • compareTo

        public int compareTo​(TestCaseProperties right)
        Compare two TC properties by name.
        Specified by:
        compareTo in interface java.lang.Comparable<TestCaseProperties>
        Parameters:
        right - another TC properties
        Returns:
        ordering of the names
      • equals

        public boolean equals​(java.lang.Object right)
        Compare by name.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        right - another test cast property collection
        Returns:
        true if the names match
      • hashCode

        public int hashCode()
        Hash code of name.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hash code
      • getKind

        public java.lang.String getKind()
        Returns:
        the kind
      • setKind

        public void setKind​(java.lang.String theKind)
        Parameters:
        theKind - the kind to set
      • setParams

        public void setParams​(java.lang.String theParams)
        Parameters:
        theParams - the params to set
      • getWeight

        public int getWeight()
        Returns:
        the weight
      • isMultiplier

        public boolean isMultiplier()
        Returns:
        true if is a multiplier
      • setWeight

        public void setWeight​(int theWeight)
        Parameters:
        theWeight - the weight to set
      • getLaunch

        public java.lang.String getLaunch()
        Returns:
        the launch
      • setLaunch

        public void setLaunch​(java.lang.String theLaunch)
        Parameters:
        theLaunch - the launch to set
      • setExpected

        public void setExpected​(java.lang.String theExpected)
        Parameters:
        theExpected - the expected to set
      • setIn

        public void setIn​(java.lang.String theInput)
        Parameters:
        theInput - the input to set
      • getTimelimit

        public int getTimelimit()
        Returns:
        the timelimit
      • setTimelimit

        public void setTimelimit​(int theTimelimit)
        Parameters:
        theTimelimit - the timelimit to set
      • isStderr

        public boolean isStderr()
        Returns:
        the stderr
      • setStderr

        public void setStderr​(boolean theStderr)
        Parameters:
        theStderr - the stderr to set
      • isStatus

        public boolean isStatus()
        Returns:
        the status
      • setStatus

        public void setStatus​(boolean theStatus)
        Parameters:
        theStatus - the status to set
      • getDescription

        public java.lang.String getDescription()
        Returns:
        the description
      • setDescription

        public void setDescription​(java.lang.String theDescription)
        Parameters:
        theDescription - the description to set
      • getFailIf

        public java.lang.String getFailIf()
        Returns:
        the failIf
      • setFailIf

        public void setFailIf​(java.lang.String theFailIf)
        Parameters:
        theFailIf - the failIf to set