Class Assertions

java.lang.Object
org.openrewrite.java.Assertions

public class Assertions extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>>
    addTypesToSourceSet(String sourceSetName)
     
    static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>>
    addTypesToSourceSet(String sourceSetName, List<String> extendsFrom)
     
    static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>>
    addTypesToSourceSet(String sourceSetName, List<String> extendsFrom, List<Path> classpath)
     
    static org.openrewrite.test.SourceSpecs
    java(@Nullable String before)
     
    static org.openrewrite.test.SourceSpecs
    java(@Nullable String before, @Nullable String after)
     
    static org.openrewrite.test.SourceSpecs
    java(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.java.tree.J.CompilationUnit>> spec)
     
    static org.openrewrite.test.SourceSpecs
    java(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.java.tree.J.CompilationUnit>> spec)
     
    javaVersion(int version)
     
    static org.openrewrite.test.SourceSpecs
    mavenProject(String project, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... sources)
     
    static org.openrewrite.test.SourceSpecs
    mavenProject(String project, org.openrewrite.test.SourceSpecs... sources)
     
    static org.openrewrite.test.SourceSpec<?>
    project(org.openrewrite.test.SourceSpec<?> sourceSpec, String projectName)
     
    static org.openrewrite.test.SourceSpec<?>
    sourceSet(org.openrewrite.test.SourceSpec<?> sourceSpec, String sourceSet)
     
    static org.openrewrite.test.SourceSpecs
    srcMainJava(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... javaSources)
     
    static org.openrewrite.test.SourceSpecs
    srcMainJava(org.openrewrite.test.SourceSpecs... javaSources)
     
    static org.openrewrite.test.SourceSpecs
    srcMainResources(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... resources)
     
    static org.openrewrite.test.SourceSpecs
    srcMainResources(org.openrewrite.test.SourceSpecs... resources)
     
    static org.openrewrite.test.SourceSpecs
    srcSmokeTestJava(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... javaSources)
     
    static org.openrewrite.test.SourceSpecs
    srcSmokeTestJava(org.openrewrite.test.SourceSpecs... javaSources)
     
    static org.openrewrite.test.SourceSpecs
    srcTestJava(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... javaSources)
     
    static org.openrewrite.test.SourceSpecs
    srcTestJava(org.openrewrite.test.SourceSpecs... javaSources)
     
    static org.openrewrite.test.SourceSpecs
    srcTestResources(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... resources)
     
    static org.openrewrite.test.SourceSpecs
    srcTestResources(org.openrewrite.test.SourceSpecs... resources)
     
    static org.openrewrite.SourceFile
    validateTypes(org.openrewrite.SourceFile source, org.openrewrite.test.TypeValidation typeValidation)
     
    static org.openrewrite.test.SourceSpec<?>
    version(org.openrewrite.test.SourceSpec<?> sourceSpec, int version)
     
    static org.openrewrite.test.SourceSpecs
    version(org.openrewrite.test.SourceSpecs sourceSpec, int version)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • validateTypes

      public static org.openrewrite.SourceFile validateTypes(org.openrewrite.SourceFile source, org.openrewrite.test.TypeValidation typeValidation)
    • java

      public static org.openrewrite.test.SourceSpecs java(@Language("java") @Nullable String before)
    • java

      public static org.openrewrite.test.SourceSpecs java(@Language("java") @Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.java.tree.J.CompilationUnit>> spec)
    • java

      public static org.openrewrite.test.SourceSpecs java(@Language("java") @Nullable String before, @Language("java") @Nullable String after)
    • java

      public static org.openrewrite.test.SourceSpecs java(@Language("java") @Nullable String before, @Language("java") @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.java.tree.J.CompilationUnit>> spec)
    • mavenProject

      public static org.openrewrite.test.SourceSpecs mavenProject(String project, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... sources)
    • mavenProject

      public static org.openrewrite.test.SourceSpecs mavenProject(String project, org.openrewrite.test.SourceSpecs... sources)
    • srcMainJava

      public static org.openrewrite.test.SourceSpecs srcMainJava(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... javaSources)
    • srcMainJava

      public static org.openrewrite.test.SourceSpecs srcMainJava(org.openrewrite.test.SourceSpecs... javaSources)
    • srcMainResources

      public static org.openrewrite.test.SourceSpecs srcMainResources(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... resources)
    • srcMainResources

      public static org.openrewrite.test.SourceSpecs srcMainResources(org.openrewrite.test.SourceSpecs... resources)
    • srcTestJava

      public static org.openrewrite.test.SourceSpecs srcTestJava(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... javaSources)
    • srcTestJava

      public static org.openrewrite.test.SourceSpecs srcTestJava(org.openrewrite.test.SourceSpecs... javaSources)
    • srcTestResources

      public static org.openrewrite.test.SourceSpecs srcTestResources(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... resources)
    • srcTestResources

      public static org.openrewrite.test.SourceSpecs srcTestResources(org.openrewrite.test.SourceSpecs... resources)
    • srcSmokeTestJava

      public static org.openrewrite.test.SourceSpecs srcSmokeTestJava(Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.SourceFile>> spec, org.openrewrite.test.SourceSpecs... javaSources)
    • srcSmokeTestJava

      public static org.openrewrite.test.SourceSpecs srcSmokeTestJava(org.openrewrite.test.SourceSpecs... javaSources)
    • version

      public static org.openrewrite.test.SourceSpec<?> version(org.openrewrite.test.SourceSpec<?> sourceSpec, int version)
    • version

      public static org.openrewrite.test.SourceSpecs version(org.openrewrite.test.SourceSpecs sourceSpec, int version)
    • project

      public static org.openrewrite.test.SourceSpec<?> project(org.openrewrite.test.SourceSpec<?> sourceSpec, String projectName)
    • sourceSet

      public static org.openrewrite.test.SourceSpec<?> sourceSet(org.openrewrite.test.SourceSpec<?> sourceSpec, String sourceSet)
    • addTypesToSourceSet

      public static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>> addTypesToSourceSet(String sourceSetName, List<String> extendsFrom, List<Path> classpath)
    • addTypesToSourceSet

      public static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>> addTypesToSourceSet(String sourceSetName, List<String> extendsFrom)
    • addTypesToSourceSet

      public static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>> addTypesToSourceSet(String sourceSetName)
    • javaVersion

      public static JavaVersion javaVersion(int version)