Package org.jmock.lib

Class CurrentStateMatcher

  • All Implemented Interfaces:
    org.hamcrest.Matcher<States>, org.hamcrest.SelfDescribing

    public class CurrentStateMatcher
    extends org.hamcrest.TypeSafeMatcher<States>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean expected  
      private java.lang.String stateName  
    • Constructor Summary

      Constructors 
      Constructor Description
      CurrentStateMatcher​(java.lang.String stateName, boolean expected)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void describeMismatchSafely​(States stateMachine, org.hamcrest.Description mismatchDescription)  
      void describeTo​(org.hamcrest.Description description)  
      static org.hamcrest.Matcher<States> isCurrently​(java.lang.String stateName)  
      static org.hamcrest.Matcher<States> isNotCurrently​(java.lang.String stateName)  
      boolean matchesSafely​(States stateMachine)  
      • Methods inherited from class org.hamcrest.TypeSafeMatcher

        describeMismatch, matches
      • Methods inherited from class org.hamcrest.BaseMatcher

        _dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • stateName

        private final java.lang.String stateName
      • expected

        private final boolean expected
    • Constructor Detail

      • CurrentStateMatcher

        public CurrentStateMatcher​(java.lang.String stateName,
                                   boolean expected)
    • Method Detail

      • matchesSafely

        public boolean matchesSafely​(States stateMachine)
        Specified by:
        matchesSafely in class org.hamcrest.TypeSafeMatcher<States>
      • describeMismatchSafely

        protected void describeMismatchSafely​(States stateMachine,
                                              org.hamcrest.Description mismatchDescription)
        Overrides:
        describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<States>
      • describeTo

        public void describeTo​(org.hamcrest.Description description)
      • isCurrently

        public static org.hamcrest.Matcher<States> isCurrently​(java.lang.String stateName)
      • isNotCurrently

        public static org.hamcrest.Matcher<States> isNotCurrently​(java.lang.String stateName)