Package it.tidalwave.util.ui
Class UserNotificationWithFeedbackTestHelper
java.lang.Object
it.tidalwave.util.ui.UserNotificationWithFeedbackTestHelper
A factory class to create testing matchers.
- Author:
- Fabrizio Giudici
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.mockito.stubbing.Answer<Void> cancel()AnAnswerthat triggers a cancellation to aUserNotificationWithFeedback.static org.mockito.stubbing.Answer<Void> confirm()AnAnswerthat triggers a confirmation to aUserNotificationWithFeedback.static org.mockito.stubbing.Answer<Void> doAndConfirm(Consumer<? super org.mockito.invocation.InvocationOnMock> thingToDo) AnAnswerthat does a thing and then triggers a confirmation to aUserNotificationWithFeedback.static UserNotificationMatchernotification(String captionRegex, String textRegex) Creates aUserNotificationmatcher for the given caption and text.notificationWithFeedback(String captionRegex, String textRegex) Creates aUserNotificationWithFeedbackmatcher for the given caption and text.
-
Constructor Details
-
UserNotificationWithFeedbackTestHelper
public UserNotificationWithFeedbackTestHelper()
-
-
Method Details
-
notification
@Nonnull public static UserNotificationMatcher notification(@Nonnull String captionRegex, @Nonnull String textRegex) Creates aUserNotificationmatcher for the given caption and text.- Parameters:
captionRegex- the regular expression that should match the captiontextRegex- the regular expression that should match the text- Returns:
- the matcher
-
notificationWithFeedback
@Nonnull public static UserNotificationWithFeedbackMatcher notificationWithFeedback(@Nonnull String captionRegex, @Nonnull String textRegex) Creates aUserNotificationWithFeedbackmatcher for the given caption and text.- Parameters:
captionRegex- the regular expression that should match the captiontextRegex- the regular expression that should match the text- Returns:
- the matcher
-
confirm
AnAnswerthat triggers a confirmation to aUserNotificationWithFeedback.- Returns:
- the
Answer
-
doAndConfirm
public static org.mockito.stubbing.Answer<Void> doAndConfirm(@Nonnull Consumer<? super org.mockito.invocation.InvocationOnMock> thingToDo) AnAnswerthat does a thing and then triggers a confirmation to aUserNotificationWithFeedback.- Parameters:
thingToDo- the thing to do- Returns:
- the
Answer - Since:
- 3.2-ALPHA-24
-
cancel
AnAnswerthat triggers a cancellation to aUserNotificationWithFeedback.- Returns:
- the
Answer
-