public class ErrorCollectionMatchers extends Object
Constructor and Description |
---|
ErrorCollectionMatchers() |
Modifier and Type | Method and Description |
---|---|
static org.hamcrest.Matcher<ErrorCollection> |
containsMessage(@NotNull org.hamcrest.Matcher<String> messageMatcher)
Matches an error collection if it contains an error message either in
ErrorCollection.getErrorMessages() or in ErrorCollection.getFieldErrors() . |
static org.hamcrest.Matcher<ErrorCollection> |
containsMessage(@NotNull String message)
Matches an error collection if it contains an error message either in
ErrorCollection.getErrorMessages() or in ErrorCollection.getFieldErrors() . |
static org.hamcrest.Matcher<ErrorCollection> |
hasAnyErrors()
Matches an error collection if it has any errors (checks
ErrorCollection.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
|
public static org.hamcrest.Matcher<ErrorCollection> containsMessage(@NotNull @NotNull String message)
ErrorCollection.getErrorMessages()
or in ErrorCollection.getFieldErrors()
.message
- error message to checkpublic static org.hamcrest.Matcher<ErrorCollection> hasError(@NotNull @NotNull String field, @NotNull @NotNull String message)
public static org.hamcrest.Matcher<ErrorCollection> containsMessage(@NotNull @NotNull org.hamcrest.Matcher<String> messageMatcher)
ErrorCollection.getErrorMessages()
or in ErrorCollection.getFieldErrors()
.messageMatcher
- error message Matcher
public static org.hamcrest.Matcher<ErrorCollection> hasAnyErrors()
ErrorCollection.hasAnyErrors()
method).public static org.hamcrest.Matcher<ErrorCollection> hasNoErrors()
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.