Class Hamcrest

java.lang.Object
io.micronaut.projectgen.micronaut.features.test.Hamcrest
All Implemented Interfaces:
io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.core.order.Ordered, Feature, OpenRewriteFeature, JunitCompanionFeature

@Requires(property="micronaut.starter.feature.hamcrest.enabled", value="true", defaultValue="true") @Singleton public class Hamcrest extends Object implements JunitCompanionFeature, OpenRewriteFeature
Feature that provides Hamcrest matchers support for Micronaut applications. This feature adds Hamcrest matchers for JUnit to enable more expressive test assertions.
  • Field Details

  • Constructor Details

    • Hamcrest

      public Hamcrest()
  • Method Details

    • getName

      @NonNull public @NonNull String getName()
      Description copied from interface: Feature
      The name of the feature. It must be unique.
      Specified by:
      getName in interface Feature
      Specified by:
      getName in interface io.micronaut.core.naming.Named
      Returns:
      the name of the feature
    • getTitle

      public String getTitle()
      Specified by:
      getTitle in interface Feature
      Returns:
      The title of the feature
    • getDescription

      @NonNull public @NonNull String getDescription()
      Specified by:
      getDescription in interface io.micronaut.core.naming.Described
      Specified by:
      getDescription in interface Feature
    • getCategory

      public String getCategory()
      Specified by:
      getCategory in interface Feature
      Returns:
      The Category to which the feature belongs to.
    • getRecipes

      public List<String> getRecipes(GeneratorContext generatorContext)
      Specified by:
      getRecipes in interface OpenRewriteFeature