Class ErrorCollectionMatchers
- java.lang.Object
-
- com.atlassian.bamboo.matcher.error.ErrorCollectionMatchers
-
public class ErrorCollectionMatchers extends Object
-
-
Constructor Summary
Constructors Constructor Description ErrorCollectionMatchers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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>
hasAnyErrors()
Matches an error collection if it has any errors (checksErrorCollection.hasAnyErrors()
method).static org.hamcrest.Matcher<ErrorCollection>
hasError(@NotNull String field, @NotNull String message)
static org.hamcrest.Matcher<ErrorCollection>
hasNoErrors()
Matches an error collection if it has no errors
-
-
-
Method Detail
-
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
public static org.hamcrest.Matcher<ErrorCollection> hasAnyErrors()
Matches an error collection if it has any errors (checksErrorCollection.hasAnyErrors()
method).
-
hasNoErrors
public static org.hamcrest.Matcher<ErrorCollection> hasNoErrors()
Matches an error collection if it has no errors
-
-