com.atlassian.jira.bc
Class ErrorMatcher

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.hamcrest.TypeSafeMatcher<ServiceOutcome<?>>
          extended by com.atlassian.jira.bc.ErrorMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<ServiceOutcome<?>>, org.hamcrest.SelfDescribing

public class ErrorMatcher
extends org.hamcrest.TypeSafeMatcher<ServiceOutcome<?>>

Since:
v6.2

Constructor Summary
ErrorMatcher()
           
 
Method Summary
 ErrorMatcher addError(String field, String message)
           
 ErrorMatcher addError(String field, String message, ErrorCollection.Reason reason)
           
 ErrorMatcher addErrorCollection(ErrorCollection errors)
           
 ErrorMatcher addErrorMessage(String message)
           
 ErrorMatcher addErrorMessage(String message, ErrorCollection.Reason reason)
           
 ErrorMatcher addErrorMessages(Collection<String> errorMessages)
           
 ErrorMatcher addErrors(Map<String,String> errors)
           
 ErrorMatcher addReason(ErrorCollection.Reason reason)
           
 ErrorMatcher addReasons(Set<ErrorCollection.Reason> reasons)
           
protected  void describeMismatchSafely(ServiceOutcome<?> item, org.hamcrest.Description mismatchDescription)
           
 void describeTo(org.hamcrest.Description description)
           
protected  boolean matchesSafely(ServiceOutcome<?> serviceOutcome)
           
 ErrorMatcher setReasons(Set<ErrorCollection.Reason> reasons)
           
 
Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, matches
 
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorMatcher

public ErrorMatcher()
Method Detail

setReasons

public ErrorMatcher setReasons(Set<ErrorCollection.Reason> reasons)

addReasons

public ErrorMatcher addReasons(Set<ErrorCollection.Reason> reasons)

addReason

public ErrorMatcher addReason(ErrorCollection.Reason reason)

addErrors

public ErrorMatcher addErrors(Map<String,String> errors)

addErrorMessages

public ErrorMatcher addErrorMessages(Collection<String> errorMessages)

addErrorMessage

public ErrorMatcher addErrorMessage(String message,
                                    ErrorCollection.Reason reason)

addErrorCollection

public ErrorMatcher addErrorCollection(ErrorCollection errors)

addError

public ErrorMatcher addError(String field,
                             String message)

addError

public ErrorMatcher addError(String field,
                             String message,
                             ErrorCollection.Reason reason)

addErrorMessage

public ErrorMatcher addErrorMessage(String message)

describeMismatchSafely

protected void describeMismatchSafely(ServiceOutcome<?> item,
                                      org.hamcrest.Description mismatchDescription)
Overrides:
describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<ServiceOutcome<?>>

matchesSafely

protected boolean matchesSafely(ServiceOutcome<?> serviceOutcome)
Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<ServiceOutcome<?>>

describeTo

public void describeTo(org.hamcrest.Description description)


Copyright © 2002-2014 Atlassian. All Rights Reserved.