org.ikasan.framework.exception.matching
Class ThrowableMessageMatcher

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.hamcrest.TypeSafeMatcher<Throwable>
          extended by org.ikasan.framework.exception.matching.ThrowableMessageMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<Throwable>, org.hamcrest.SelfDescribing

public class ThrowableMessageMatcher
extends org.hamcrest.TypeSafeMatcher<Throwable>

Implementation of TypeSafeMatcher for matching instances of Throwable by considering the message of the Throwable For now only supports direct matches of a supplied substring within the Throwable's message In future could be extended to support a more powerful regular expression match

Author:
Ikasan Development Team

Constructor Summary
ThrowableMessageMatcher(String substring)
          Constructor
 
Method Summary
 void describeTo(org.hamcrest.Description description)
           
 boolean matchesSafely(Throwable throwable)
           
 
Methods inherited from class org.hamcrest.TypeSafeMatcher
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

ThrowableMessageMatcher

public ThrowableMessageMatcher(String substring)
Constructor

Parameters:
substring -
Method Detail

matchesSafely

public boolean matchesSafely(Throwable throwable)
Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<Throwable>

describeTo

public void describeTo(org.hamcrest.Description description)


Copyright © 2007-2012 Ikasan. All Rights Reserved.