Class BasicCommentFactory

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

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

A basic implementation of a comment factory.

  • Constructor Details

    • BasicCommentFactory

      public BasicCommentFactory(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
    • setNumberOfTraceLines

      public static void setNumberOfTraceLines(int lines)