Class ErrorCollectionMatchers
java.lang.Object
com.atlassian.bamboo.matcher.error.ErrorCollectionMatchers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.hamcrest.Matcher<ErrorCollection> containsMessage(@NotNull String message) Matches an error collection if it contains an error message either inErrorCollection.getErrorMessages()or inErrorCollection.getFieldErrors().static org.hamcrest.Matcher<ErrorCollection> containsMessage(@NotNull org.hamcrest.Matcher<String> messageMatcher) Matches an error collection if it contains an error message either inErrorCollection.getErrorMessages()or inErrorCollection.getFieldErrors().static org.hamcrest.Matcher<ErrorCollection> Matches an error collection if it has any errors (checksErrorCollection.hasAnyErrors()method).static org.hamcrest.Matcher<ErrorCollection> static org.hamcrest.Matcher<ErrorCollection> Matches an error collection if it has no errors
-
Constructor Details
-
ErrorCollectionMatchers
public ErrorCollectionMatchers()
-
-
Method Details
-
containsMessage
public static org.hamcrest.Matcher<ErrorCollection> containsMessage(@NotNull @NotNull String message) Matches an error collection if it contains an error message either inErrorCollection.getErrorMessages()or inErrorCollection.getFieldErrors().- Parameters:
message- error message to check
-
hasError
public static org.hamcrest.Matcher<ErrorCollection> hasError(@NotNull @NotNull String field, @NotNull @NotNull String message) -
containsMessage
public static org.hamcrest.Matcher<ErrorCollection> containsMessage(@NotNull @NotNull org.hamcrest.Matcher<String> messageMatcher) Matches an error collection if it contains an error message either inErrorCollection.getErrorMessages()or inErrorCollection.getFieldErrors().- Parameters:
messageMatcher- error messageMatcher
-
hasAnyErrors
Matches an error collection if it has any errors (checksErrorCollection.hasAnyErrors()method). -
hasNoErrors
Matches an error collection if it has no errors
-