Class MockMailboxImpl

  • All Implemented Interfaces:
    MockMailbox

    @ApplicationScoped
    public class MockMailboxImpl
    extends Object
    implements MockMailbox
    Mock mailbox bean, will be populated if mocking emails.
    • Constructor Detail

      • MockMailboxImpl

        public MockMailboxImpl()
    • Method Detail

      • send

        io.smallrye.mutiny.Uni<Void> send​(Mail email)
      • getMessagesSentTo

        public List<Mail> getMessagesSentTo​(String address)
        Description copied from interface: MockMailbox
        Returns a list of mails sent to the given address, whether it was via To, Cc or Bcc.
        Specified by:
        getMessagesSentTo in interface MockMailbox
        Parameters:
        address - the email address we want to retrieve mail from
        Returns:
        a list of messages sent to the given address, possibly empty.
      • clear

        public void clear()
        Description copied from interface: MockMailbox
        Removes every sent message.
        Specified by:
        clear in interface MockMailbox
      • getTotalMessagesSent

        public int getTotalMessagesSent()
        Description copied from interface: MockMailbox
        Gets the total number of messages sent. This counts every message sent to every recipient.
        Specified by:
        getTotalMessagesSent in interface MockMailbox
        Returns:
        the total number of messages sent.