Package 

Class BotBusMockLog


  • 
    public final class BotBusMockLog
    
                        

    The actions sent by the mocked bus.

    • 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)
    • Method Summary

      Modifier and Type Method Description
      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
      final Action component1()
      final Long component2()
      final BotBusMockLog copy(Action action, Long delay)
      final Action getAction() The action sent.
      final Long getDelay() The delay before the action is sent.
      • Methods inherited from class ai.tock.bot.test.BotBusMockLog

        equals, hashCode, toString
      • 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

      • 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

      • getAction

         final Action getAction()

        The action sent.

      • getDelay

         final Long getDelay()

        The delay before the action is sent.