tests
Class TestingSupport


java.lang.Object

  extended by tests.TestingSupport


public class TestingSupport
extends java.lang.Object


Constructor Summary
TestingSupport()
           
 
Method Summary
static boolean correctResults(java.lang.String filename, java.lang.String results)
          Feel free to use the correctResults method while developing your own tests.
static java.lang.String fileData(java.lang.String fileName)
           
static java.lang.String removeBlanks(java.lang.String src)
           
static boolean sameContents(java.lang.String firstFile, java.lang.String secondFile)
           
static boolean writeToFile(java.lang.String filename, java.lang.String message)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestingSupport


public TestingSupport()
Method Detail

correctResults


public static boolean correctResults(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)


Web Accessibility