| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.exolab.jmscts.core.AbstractMessageVerifier
A helper class for verifying the content of messages. This class provides no verification functionality - that is left to sublasses.
It does provide helper methods to:
MessageVerifier, Serialized Form| Constructor Summary | |
| AbstractMessageVerifier()Construct a new instance. | |
| AbstractMessageVerifier(java.lang.Class exception)Construct an instance with the expected exception thrown when methods are invoked | |
| Method Summary | |
| protected  void | equal(java.lang.Object value,
      java.lang.Object expected)Helper to compare two objects for equality | 
| protected  void | expect(javax.jms.Message message,
       java.lang.String method,
       java.lang.Object expected)Helper to invoke a method taking no arguments, and verify that the result matches that expected | 
| protected  void | expect(javax.jms.Message message,
       java.lang.String method,
       java.lang.Object[] values,
       java.lang.Object expected)Helper to invoke a method taking a list of arguments, and verify that the result matches that expected | 
| protected  void | expect(javax.jms.Message message,
       java.lang.String method,
       java.lang.Object value,
       java.lang.Object expected)Helper to invoke a method taking a single argument, and verify that the result matches that expected | 
|  java.lang.Class | getExpectedException()Return the exception type expected to be thrown by methods | 
| protected  MethodCache | getMethods()Returns a cache of methods for a message, to avoid expensive reflect operations. | 
| protected  java.lang.Object | invoke(javax.jms.Message message,
       java.lang.String method)Invoke a method taking no arguments | 
| protected  java.lang.Object | invoke(javax.jms.Message message,
       java.lang.String method,
       java.lang.Object value)Invoke a method taking a single argument | 
| protected  java.lang.Object | invoke(javax.jms.Message message,
       java.lang.String method,
       java.lang.Object[] values)Invoke a method taking multiple arguments | 
|  void | verify(javax.jms.Message message)Verify a message's content. | 
|  void | verifyBytesMessage(javax.jms.BytesMessage message)Verify a BytesMessage instance. | 
|  void | verifyMapMessage(javax.jms.MapMessage message)Verify a MapMessage instance. | 
|  void | verifyMessage(javax.jms.Message message)Verify a Message instance. | 
|  void | verifyObjectMessage(javax.jms.ObjectMessage message)Verify an ObjectMessage instance. | 
|  void | verifyStreamMessage(javax.jms.StreamMessage message)Verify a StreamMessage instance. | 
|  void | verifyTextMessage(javax.jms.TextMessage message)Verify a TextMessage instance. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public AbstractMessageVerifier()
public AbstractMessageVerifier(java.lang.Class exception)
exception - the expected exception type when methods are invoked| Method Detail | 
public void verify(javax.jms.Message message)
            throws java.lang.Exception
verify in interface MessageVerifiermessage - the message to verifyjava.lang.Exception - for any error
public void verifyMessage(javax.jms.Message message)
                   throws java.lang.Exception
message - the message to verifyjava.lang.Exception - for any error
public void verifyBytesMessage(javax.jms.BytesMessage message)
                        throws java.lang.Exception
message - the message to verifyjava.lang.Exception - for any error
public void verifyMapMessage(javax.jms.MapMessage message)
                      throws java.lang.Exception
message - the message to verifyjava.lang.Exception - for any error
public void verifyObjectMessage(javax.jms.ObjectMessage message)
                         throws java.lang.Exception
message - the message to verifyjava.lang.Exception - for any error
public void verifyStreamMessage(javax.jms.StreamMessage message)
                         throws java.lang.Exception
message - the message to verifyjava.lang.Exception - for any error
public void verifyTextMessage(javax.jms.TextMessage message)
                       throws java.lang.Exception
message - the message to verifyjava.lang.Exception - for any errorpublic java.lang.Class getExpectedException()
protected java.lang.Object invoke(javax.jms.Message message,
                                  java.lang.String method)
                           throws java.lang.Exception
message - the message to invoke the method onmethod - the method to invokejava.lang.Exception - for any error
protected java.lang.Object invoke(javax.jms.Message message,
                                  java.lang.String method,
                                  java.lang.Object value)
                           throws java.lang.Exception
message - the message to invoke the method onmethod - the method to invokevalue - the argument to pass to the methodjava.lang.Exception - for any error
protected java.lang.Object invoke(javax.jms.Message message,
                                  java.lang.String method,
                                  java.lang.Object[] values)
                           throws java.lang.Exception
message - the message to invoke the method onmethod - the method to invokevalues - the arguments to pass to the methodjava.lang.Exception - for any error
protected void expect(javax.jms.Message message,
                      java.lang.String method,
                      java.lang.Object expected)
               throws java.lang.Exception
message - the message to invoke the method onmethod - the method to invokeexpected - the expected return valuejava.lang.Exception - for any error
protected void expect(javax.jms.Message message,
                      java.lang.String method,
                      java.lang.Object value,
                      java.lang.Object expected)
               throws java.lang.Exception
message - the message to invoke the method onmethod - the method to invokevalue - the argument to pass to the methodexpected - the expected return valuejava.lang.Exception - for any error
protected void expect(javax.jms.Message message,
                      java.lang.String method,
                      java.lang.Object[] values,
                      java.lang.Object expected)
               throws java.lang.Exception
message - the message to invoke the method onmethod - the method to invokevalues - the arguments to pass to the methodexpected - the expected return valuejava.lang.Exception - for any error
protected void equal(java.lang.Object value,
                     java.lang.Object expected)
              throws java.lang.Exception
value - the value to compare againstexpected - the expected valuejava.lang.Exception - if the objects aren't equalprotected MethodCache getMethods()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||