Class RecipeSpec

java.lang.Object
org.openrewrite.test.RecipeSpec

public class RecipeSpec extends Object
  • Constructor Details

    • RecipeSpec

      public RecipeSpec()
  • Method Details

    • defaults

      public static RecipeSpec defaults()
    • allSources

      public SourceSpec<org.openrewrite.SourceFile> allSources()
      Configuration that applies to all source file inputs.
    • recipe

      public RecipeSpec recipe(org.openrewrite.Recipe recipe)
    • recipe

      public RecipeSpec recipe(InputStream yaml, String... recipes)
    • recipe

      public RecipeSpec recipe(String yamlResource, String... recipes)
    • parser

      public RecipeSpec parser(org.openrewrite.Parser.Builder parser)
      Parameters:
      parser - The parser supplier to use when a matching source file is found.
      Returns:
      The current recipe spec.
    • executionContext

      public RecipeSpec executionContext(org.openrewrite.ExecutionContext executionContext)
    • recipeExecutionContext

      public RecipeSpec recipeExecutionContext(org.openrewrite.ExecutionContext executionContext)
    • markerPrinter

      public RecipeSpec markerPrinter(org.openrewrite.PrintOutputCapture.MarkerPrinter markerPrinter)
    • relativeTo

      public RecipeSpec relativeTo(@Nullable @Nullable Path relativeTo)
    • cycles

      public RecipeSpec cycles(int cycles)
    • beforeRecipe

      public RecipeSpec beforeRecipe(UncheckedConsumer<List<org.openrewrite.SourceFile>> beforeRecipe)
    • afterRecipe

      public RecipeSpec afterRecipe(UncheckedConsumer<org.openrewrite.RecipeRun> afterRecipe)
    • dataTable

      @Incubating(since="7.35.0") public <E> RecipeSpec dataTable(Class<E> rowType, UncheckedConsumer<List<E>> extract)
    • dataTableAsCsv

      @Incubating(since="7.35.0") public <E, V> RecipeSpec dataTableAsCsv(Class<org.openrewrite.DataTable<?>> dataTableClass, String expect)
    • dataTableAsCsv

      @Incubating(since="7.35.0") public <E, V> RecipeSpec dataTableAsCsv(String name, String expect)
    • validateRecipeSerialization

      @Incubating(since="7.35.0") public RecipeSpec validateRecipeSerialization(boolean validate)
    • expectedCyclesThatMakeChanges

      public RecipeSpec expectedCyclesThatMakeChanges(int expectedCyclesThatMakeChanges)
    • typeValidationOptions

      public RecipeSpec typeValidationOptions(TypeValidation typeValidation)