jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asm...@apache.org
Subject svn commit: r783796 - /jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/http/server/RemoteCacheServiceAdaptorUnitTest.java
Date Thu, 11 Jun 2009 14:27:25 GMT
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


Mime
View raw message