Package student

Class Assert

java.lang.Object
student.Assert

public class Assert extends Object
This class is the student library equivalent of JUnit's Assert class. It provides customized assertion methods as a series of static methods. They can be imported statically into JUnit 4-style test cases by students.
  • Method Details

    • normalizeLineEndings

      public static String normalizeLineEndings(String text)
      Converts all line ending sequences in a given text string to unix-style newlines (\n). This is used in a number of assertions to provide for platform-independent comparison of multi-line strings.
      Parameters:
      text - The text to normalize.
      Returns:
      The value of text, with all line separator sequences replaced by "\n" (all line separators converted to unix-style line separators).