org.apache.jcs.auxiliary.remote.server
Class RemoteCacheServerUnitTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jcs.auxiliary.remote.server.RemoteCacheServerUnitTest
All Implemented Interfaces:
junit.framework.Test

public class RemoteCacheServerUnitTest
extends junit.framework.TestCase

Since the server does not know that it is a server, it is easy to unit test. The factory does all the rmi work.

Author:
Aaron Smuts

Constructor Summary
RemoteCacheServerUnitTest()
           
 
Method Summary
 void testAddListener_ToAll()
          Add a listener.
 void testAddListener_ToAllThenRemove_clusterType()
          Add a listener.
 void testAddListener_ToAllThenRemove()
          Add a listener.
 void testAddListenerToCache_CLUSTERtype()
          Add a listener.
 void testAddListenerToCache_LOCALtype()
          Add a listener.
 void testGet_simple()
          Verify event log calls.
 void testGetMatching_simple()
          Verify event log calls.
 void testGetMultiple_simple()
          Verify event log calls.
 void testRemove_simple()
          Verify event log calls.
 void testRemoveAll_simple()
          Verify event log calls.
 void testSimpleRegisterListenerAndPut_FromClusterWithLCC()
          Register a listener and then verify that it is called when we put using a different listener id.
 void testSimpleRegisterListenerAndPut()
          Register a listener and then verify that it is called when we put using a different listener id.
 void testSimpleRegisterListenerAndRemove()
          Register a listener and then verify that it is called when we put using a different listener id.
 void testUpdate_simple()
          Verify event log calls.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteCacheServerUnitTest

public RemoteCacheServerUnitTest()
Method Detail

testAddListenerToCache_LOCALtype

public void testAddListenerToCache_LOCALtype()
                                      throws Exception
Add a listener. Pass the id of 0, verify that the server sets a new listener id. Do another and verify that the second gets an id of 2.

Throws:
Exception

testAddListenerToCache_CLUSTERtype

public void testAddListenerToCache_CLUSTERtype()
                                        throws Exception
Add a listener. Pass the id of 0, verify that the server sets a new listener id. Do another and verify that the second gets an id of 2.

Throws:
Exception

testAddListener_ToAll

public void testAddListener_ToAll()
                           throws Exception
Add a listener. Pass the id of 0, verify that the server sets a new listener id. Do another and verify that the second gets an id of 2.

Throws:
Exception

testAddListener_ToAllThenRemove

public void testAddListener_ToAllThenRemove()
                                     throws Exception
Add a listener. Pass the id of 0, verify that the server sets a new listener id. Do another and verify that the second gets an id of 2. Call remove Listener and verify that it is removed.

Throws:
Exception

testAddListener_ToAllThenRemove_clusterType

public void testAddListener_ToAllThenRemove_clusterType()
                                                 throws Exception
Add a listener. Pass the id of 0, verify that the server sets a new listener id. Do another and verify that the second gets an id of 2. Call remove Listener and verify that it is removed.

Throws:
Exception

testSimpleRegisterListenerAndPut

public void testSimpleRegisterListenerAndPut()
                                      throws Exception
Register a listener and then verify that it is called when we put using a different listener id.

Throws:
Exception

testSimpleRegisterListenerAndPut_FromClusterWithLCC

public void testSimpleRegisterListenerAndPut_FromClusterWithLCC()
                                                         throws Exception
Register a listener and then verify that it is called when we put using a different listener id. The updates should come from a cluster listener and local cluster consistency should be true.

Throws:
Exception

testSimpleRegisterListenerAndRemove

public void testSimpleRegisterListenerAndRemove()
                                         throws Exception
Register a listener and then verify that it is called when we put using a different listener id.

Throws:
Exception

testUpdate_simple

public void testUpdate_simple()
                       throws Exception
Verify event log calls.

Throws:
Exception

testGet_simple

public void testGet_simple()
                    throws Exception
Verify event log calls.

Throws:
Exception

testGetMatching_simple

public void testGetMatching_simple()
                            throws Exception
Verify event log calls.

Throws:
Exception

testGetMultiple_simple

public void testGetMultiple_simple()
                            throws Exception
Verify event log calls.

Throws:
Exception

testRemove_simple

public void testRemove_simple()
                       throws Exception
Verify event log calls.

Throws:
Exception

testRemoveAll_simple

public void testRemoveAll_simple()
                          throws Exception
Verify event log calls.

Throws:
Exception


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.