Class UserNotificationWithFeedbackTestHelper


  • public final class UserNotificationWithFeedbackTestHelper
    extends java.lang.Object
    A factory class to create testing matchers.
    Author:
    Fabrizio Giudici
    • Constructor Detail

      • UserNotificationWithFeedbackTestHelper

        public UserNotificationWithFeedbackTestHelper()
    • Method Detail

      • notification

        @Nonnull
        public static UserNotificationMatcher notification​(@Nonnull
                                                           java.lang.String captionRegex,
                                                           @Nonnull
                                                           java.lang.String textRegex)
        Creates a UserNotification matcher for the given caption and text.
        Parameters:
        captionRegex - the regular expression that should match the caption
        textRegex - the regular expression that should match the text
        Returns:
        the matcher
      • notificationWithFeedback

        @Nonnull
        public static UserNotificationWithFeedbackMatcher notificationWithFeedback​(@Nonnull
                                                                                   java.lang.String captionRegex,
                                                                                   @Nonnull
                                                                                   java.lang.String textRegex)
        Creates a UserNotificationWithFeedback matcher for the given caption and text.
        Parameters:
        captionRegex - the regular expression that should match the caption
        textRegex - the regular expression that should match the text
        Returns:
        the matcher
      • confirm

        public static org.mockito.stubbing.Answer<java.lang.Void> confirm()
        An Answer that triggers a confirmation to a UserNotificationWithFeedback.
        Returns:
        the Answer
      • cancel

        public static org.mockito.stubbing.Answer<java.lang.Void> cancel()
        An Answer that triggers a cancellation to a UserNotificationWithFeedback.
        Returns:
        the Answer