Class JunitCommentFactory

java.lang.Object
org.tudalgo.algoutils.tutor.general.assertions.basic.JunitCommentFactory
All Implemented Interfaces:
CommentFactory<Result<?,?,?,?>>

public final class JunitCommentFactory extends Object implements CommentFactory<Result<?,?,?,?>>

An implementation of a comment factory for JUnit runs.

  • Constructor Details

    • JunitCommentFactory

      public JunitCommentFactory(Environment environment)

      Constructs a new comment factory with the given environment.

      Parameters:
      environment - the environment
  • Method Details

    • comment

      public <TS extends Result<?, ?, ?, ?>> String comment(TS result, Context context, PreCommentSupplier<? super TS> commentSupplier)
      Description copied from interface: CommentFactory
      Returns the comment for the given test result, context and pre-comment supplier.
      Specified by:
      comment in interface CommentFactory<Result<?,?,?,?>>
      Type Parameters:
      TS - the type of the test result
      Parameters:
      result - the test result
      context - the context of the test
      commentSupplier - the supplier for the pre-comment
      Returns:
      the comment