You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by as...@apache.org on 2009/06/11 16:27:25 UTC
svn commit: r783796 -
/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptorUnitTest.java
Author: asmuts
Date: Thu Jun 11 14:27:25 2009
New Revision: 783796
URL: http://svn.apache.org/viewvc?rev=783796&view=rev
Log:
adding an additional unit test for the adaptor
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptorUnitTest.java
Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptorUnitTest.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptorUnitTest.java?rev=783796&r1=783795&r2=783796&view=diff
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptorUnitTest.java (original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptorUnitTest.java Thu Jun 11 14:27:25 2009
@@ -35,6 +35,26 @@
public class RemoteCacheServiceAdaptorUnitTest
extends TestCase
{
+ /** Verify that we balk and return an error. */
+ public void testProcessRequest_null()
+ {
+ // SETUP
+ RemoteCacheServiceAdaptor adaptor = new RemoteCacheServiceAdaptor();
+
+ MockRemoteCacheService remoteHttpCacheService = new MockRemoteCacheService();
+ adaptor.setRemoteCacheService( remoteHttpCacheService );
+
+ RemoteCacheRequest request = null;
+
+ // DO WORK
+ RemoteCacheResponse result = adaptor.processRequest( request );
+
+ // VERIFY
+ assertNotNull( "Should have a result.", result );
+ assertTrue( "Should have 'The request is null' in the errorMessage", result.getErrorMessage().indexOf( "The request is null" ) != -1 );
+ assertTrue( "Should have 'The request is null' in the toString", result.toString().indexOf( "The request is null" ) != -1 );
+ }
+
/** Verify that the service is called. */
public void testProcessRequest_Get()
{
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org