Package it.tidalwave.util.ui
Class UserNotificationWithFeedbackTestHelper
- java.lang.Object
-
- it.tidalwave.util.ui.UserNotificationWithFeedbackTestHelper
-
public final class UserNotificationWithFeedbackTestHelper extends java.lang.Object
A factory class to create testing matchers.- Author:
- Fabrizio Giudici
-
-
Constructor Summary
Constructors Constructor Description UserNotificationWithFeedbackTestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.mockito.stubbing.Answer<java.lang.Void>
cancel()
AnAnswer
that triggers a cancellation to aUserNotificationWithFeedback
.static org.mockito.stubbing.Answer<java.lang.Void>
confirm()
AnAnswer
that triggers a confirmation to aUserNotificationWithFeedback
.static UserNotificationMatcher
notification(java.lang.String captionRegex, java.lang.String textRegex)
Creates aUserNotification
matcher for the given caption and text.static UserNotificationWithFeedbackMatcher
notificationWithFeedback(java.lang.String captionRegex, java.lang.String textRegex)
Creates aUserNotificationWithFeedback
matcher for the given caption and text.
-
-
-
Method Detail
-
notification
@Nonnull public static UserNotificationMatcher notification(@Nonnull java.lang.String captionRegex, @Nonnull java.lang.String textRegex)
Creates aUserNotification
matcher 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 java.lang.String captionRegex, @Nonnull java.lang.String textRegex)
Creates aUserNotificationWithFeedback
matcher 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
public static org.mockito.stubbing.Answer<java.lang.Void> confirm()
AnAnswer
that triggers a confirmation to aUserNotificationWithFeedback
.- Returns:
- the
Answer
-
cancel
public static org.mockito.stubbing.Answer<java.lang.Void> cancel()
AnAnswer
that triggers a cancellation to aUserNotificationWithFeedback
.- Returns:
- the
Answer
-
-