Class Assertions

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

public class Assertions extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.openrewrite.test.SourceSpecs
    buildGradle(@Nullable String before)
     
    static org.openrewrite.test.SourceSpecs
    buildGradle(@Nullable String before, @Nullable String after)
     
    static org.openrewrite.test.SourceSpecs
    buildGradle(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.groovy.tree.G.CompilationUnit>> spec)
     
    static org.openrewrite.test.SourceSpecs
    buildGradle(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.groovy.tree.G.CompilationUnit>> spec)
     
    static org.openrewrite.test.SourceSpecs
    buildGradleKts(@Nullable String before)
     
    static org.openrewrite.test.SourceSpecs
    buildGradleKts(@Nullable String before, @Nullable String after)
     
    static org.openrewrite.test.SourceSpecs
    buildGradleKts(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.kotlin.tree.K.CompilationUnit>> spec)
     
    static org.openrewrite.test.SourceSpecs
    buildGradleKts(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.kotlin.tree.K.CompilationUnit>> spec)
     
    static org.openrewrite.test.SourceSpecs
    lockfile(@Nullable String before)
     
    static org.openrewrite.test.SourceSpecs
    lockfile(@Nullable String before, @Nullable String after)
     
    static org.openrewrite.test.SourceSpecs
    lockfile(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.text.PlainText>> spec)
     
    static org.openrewrite.test.SourceSpecs
    lockfile(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.text.PlainText>> spec)
     
    static org.openrewrite.test.SourceSpecs
    settingsGradle(@Nullable String before)
     
    static org.openrewrite.test.SourceSpecs
    settingsGradle(@Nullable String before, @Nullable String after)
     
    static org.openrewrite.test.SourceSpecs
    settingsGradle(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.groovy.tree.G.CompilationUnit>> spec)
     
    static org.openrewrite.test.SourceSpecs
    settingsGradle(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.groovy.tree.G.CompilationUnit>> spec)
     
    static org.openrewrite.test.SourceSpecs
    settingsGradleKts(@Nullable String before)
     
    static org.openrewrite.test.SourceSpecs
    settingsGradleKts(@Nullable String before, @Nullable String after)
     
    static org.openrewrite.test.SourceSpecs
    settingsGradleKts(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.kotlin.tree.K.CompilationUnit>> spec)
     
    static org.openrewrite.test.SourceSpecs
    settingsGradleKts(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.kotlin.tree.K.CompilationUnit>> spec)
     
    static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>>
    Deprecated.
    This method has moved to org.openrewrite.gradle.toolingapi.Assertions.
    static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>>
    withToolingApi(@Nullable String version, @Nullable String distribution)
    Deprecated.
    This method has moved to org.openrewrite.gradle.toolingapi.Assertions.
    static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>>
    Deprecated.
    This method has moved to org.openrewrite.gradle.toolingapi.Assertions.

    Methods inherited from class java.lang.Object

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

    • withToolingApi

      @Deprecated public static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>> withToolingApi(@Nullable String version, @Nullable String distribution)
      Deprecated.
      This method has moved to org.openrewrite.gradle.toolingapi.Assertions. This has allowed us to remove the compile time dependency on the tooling model and thus save a lot of space in the distribution of rewrite-gradle recipes.
      Parameters:
      version - The Gradle version to use.
      distribution - The Gradle distribution to use.
      Returns:
      An exception now that the method has moved.
    • withToolingApi

      @Deprecated public static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>> withToolingApi(String version)
      Deprecated.
      This method has moved to org.openrewrite.gradle.toolingapi.Assertions. This has allowed us to remove the compile time dependency on the tooling model and thus save a lot of space in the distribution of rewrite-gradle recipes.
      Parameters:
      version - The Gradle version to use.
      Returns:
      An exception now that the method has moved.
    • withToolingApi

      @Deprecated public static org.openrewrite.test.UncheckedConsumer<List<org.openrewrite.SourceFile>> withToolingApi()
      Deprecated.
      This method has moved to org.openrewrite.gradle.toolingapi.Assertions. This has allowed us to remove the compile time dependency on the tooling model and thus save a lot of space in the distribution of rewrite-gradle recipes.
      Returns:
      An exception now that the method has moved.
    • buildGradle

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

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

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

      public static org.openrewrite.test.SourceSpecs buildGradle(@Language("groovy") @Nullable String before, @Language("groovy") @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.groovy.tree.G.CompilationUnit>> spec)
    • buildGradleKts

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

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

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

      public static org.openrewrite.test.SourceSpecs buildGradleKts(@Language("kotlin") @Nullable String before, @Language("kotlin") @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.kotlin.tree.K.CompilationUnit>> spec)
    • settingsGradle

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

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

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

      public static org.openrewrite.test.SourceSpecs settingsGradle(@Language("groovy") @Nullable String before, @Language("groovy") @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.groovy.tree.G.CompilationUnit>> spec)
    • settingsGradleKts

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

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

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

      public static org.openrewrite.test.SourceSpecs settingsGradleKts(@Language("kotlin") @Nullable String before, @Language("kotlin") @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.kotlin.tree.K.CompilationUnit>> spec)
    • lockfile

      public static org.openrewrite.test.SourceSpecs lockfile(@Nullable String before)
    • lockfile

      public static org.openrewrite.test.SourceSpecs lockfile(@Nullable String before, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.text.PlainText>> spec)
    • lockfile

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

      public static org.openrewrite.test.SourceSpecs lockfile(@Nullable String before, @Nullable String after, Consumer<org.openrewrite.test.SourceSpec<org.openrewrite.text.PlainText>> spec)