Package tests
Class TestsSupport
java.lang.Object
tests.TestsSupport
public class TestsSupport
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description TestsSupport() -
Method Summary
Modifier and Type Method Description static java.lang.StringfileData(java.lang.String fileName)static booleanisCorrect(java.lang.String filename, java.lang.String results)Feel free to use the correctResults method while developing your own tests.static java.lang.StringremoveBlanks(java.lang.String src)static booleansameContents(java.lang.String firstFile, java.lang.String secondFile)static booleanwriteToFile(java.lang.String filename, java.lang.String message)
-
Constructor Details
-
TestsSupport
public TestsSupport()
-
-
Method Details
-
isCorrect
public static boolean isCorrect(java.lang.String filename, java.lang.String results)Feel free to use the correctResults method while developing your own tests. Notice that if you define text files with some expected results, the text files must be named starting with "studentTest" and ending with the .txt extension. If you don't name files this way, then the submit server will generate an authorization error.- Parameters:
filename-results-- Returns:
- true if the contents of the file corresponds to those in results
-
sameContents
public static boolean sameContents(java.lang.String firstFile, java.lang.String secondFile) -
fileData
public static java.lang.String fileData(java.lang.String fileName) -
removeBlanks
public static java.lang.String removeBlanks(java.lang.String src) -
writeToFile
public static boolean writeToFile(java.lang.String filename, java.lang.String message)
-