Package spoon.testing

Class Assert

java.lang.Object
spoon.testing.Assert

public class Assert extends Object
Entry point for assertion methods for different data types. Each method in this class is a static factory for the type-specific assertion objects. The purpose of this class is to make test code more readable.
  • Method Details

    • assertThat

      public static AbstractFileAssert<?> assertThat(String actual)
      Create a new instance of FileAssert.
      Parameters:
      actual - The actual value.
      Returns:
      the created assertion object.
    • assertThat

      public static AbstractFileAssert<?> assertThat(File actual)
      Create a new instance of FileAssert.
      Parameters:
      actual - The actual value.
      Returns:
      the created assertion object.
    • assertThat

      public static AbstractCtElementAssert<?> assertThat(CtElement actual)
      Create a new instance of CtElementAssert. Note that a package typed by CtElement will call this method and not assertThat(CtPackage).
      Parameters:
      actual - The actual value.
      Returns:
      the created assertion object.
    • assertThat

      public static AbstractCtPackageAssert<?> assertThat(CtPackage actual)
      Create a new instance of CtPackageAssert. Note that this assert will be make a deep equals with its content (all types).
      Parameters:
      actual - The actual value.
      Returns:
      the created assertion object.