Class ValidationResultMatchers
java.lang.Object
com.atlassian.confluence.api.testsupport.matchers.model.permissions.ValidationResultMatchers
Matchers to support tests on
ValidationResults.-
Method Summary
Modifier and TypeMethodDescriptionstatic org.hamcrest.Matcher<Map<Target, ValidationResult>> allAuthorized(Iterable<Target> targets) static org.hamcrest.Matcher<Map<Target, ValidationResult>> allForbidden(Iterable<Target> targets) static org.hamcrest.Matcher<Map<Target, ValidationResult>> allInvalid(Iterable<Target> targets, Class<? extends ServiceException> expectedExceptionClass) static org.hamcrest.Matcher<ValidationResult> static booleanisAuthorized(ValidationResult result) static org.hamcrest.Matcher<ValidationResult> static booleanisForbidden(ValidationResult result) static booleanisInvalid(ValidationResult result, Class<? extends ServiceException> expectedExceptionClass) static org.hamcrest.Matcher<ValidationResult> isInvalid(Class<? extends ServiceException> expectedExceptionClass)
-
Method Details
-
isAuthorized
-
isForbidden
-
isInvalid
public static boolean isInvalid(ValidationResult result, Class<? extends ServiceException> expectedExceptionClass) -
isAuthorized
-
isForbidden
-
isInvalid
public static org.hamcrest.Matcher<ValidationResult> isInvalid(Class<? extends ServiceException> expectedExceptionClass) -
allAuthorized
public static org.hamcrest.Matcher<Map<Target,ValidationResult>> allAuthorized(Iterable<Target> targets) -
allForbidden
public static org.hamcrest.Matcher<Map<Target,ValidationResult>> allForbidden(Iterable<Target> targets) -
allInvalid
public static org.hamcrest.Matcher<Map<Target,ValidationResult>> allInvalid(Iterable<Target> targets, Class<? extends ServiceException> expectedExceptionClass)
-