Class BotBusMockLog

  • All Implemented Interfaces:

    
    public final class BotBusMockLog
    
                        

    The actions sent by the mocked bus.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Action action
      private final Long delay
    • Constructor Summary

      Constructors 
      Constructor Description
      BotBusMockLog(Action action, Long delay)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Action getAction() The action sent.
      final Long getDelay() The delay before the action is sent.
      final ConnectorMessage message(ConnectorType connectorType) The message of the specified ConnectorType if it exists.
      final String text() The text message if any.
      final Unit assertText(String text, String errorMessage) Assert that log contains specified text.
      final Unit assert(String text) Assert that log contains specified text.
      final Unit assert(ConnectorMessageProvider message) Assert that log contains specified message.
      final Unit assertMessage(ConnectorMessage message, String errorMessage) Assert that log contains specified ConnectorMessage.
      final GenericMessage genericMessage() Convert current BotBusLog action first message to a generic message
      final Choice elementChoice(Integer elementIndex, String title) Retrieve choice member with expected title belonging to element with specified index
      final Choice choice(String title) Retrieve choice member of main part of generic message with expected title
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BotBusMockLog

        BotBusMockLog(Action action, Long delay)
    • Method Detail

      • getAction

         final Action getAction()

        The action sent.

      • getDelay

         final Long getDelay()

        The delay before the action is sent.

      • message

         final ConnectorMessage message(ConnectorType connectorType)

        The message of the specified ConnectorType if it exists.

      • text

         final String text()

        The text message if any.

      • assert

         final Unit assert(String text)

        Assert that log contains specified text.

      • assert

         final Unit assert(ConnectorMessageProvider message)

        Assert that log contains specified message.

      • assertMessage

         final Unit assertMessage(ConnectorMessage message, String errorMessage)

        Assert that log contains specified ConnectorMessage.

      • genericMessage

         final GenericMessage genericMessage()

        Convert current BotBusLog action first message to a generic message

      • elementChoice

         final Choice elementChoice(Integer elementIndex, String title)

        Retrieve choice member with expected title belonging to element with specified index

      • choice

         final Choice choice(String title)

        Retrieve choice member of main part of generic message with expected title