org.apache.jcs.auxiliary.lateral.socket.tcp
Class TestTCPLateralUnitTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jcs.auxiliary.lateral.socket.tcp.TestTCPLateralUnitTest
All Implemented Interfaces:
junit.framework.Test

public class TestTCPLateralUnitTest
extends junit.framework.TestCase

Basic unit tests for the sending and receiving portions of the lateral cache.

Author:
Aaron Smuts

Constructor Summary
TestTCPLateralUnitTest()
           
 
Method Summary
 void setUp()
          Test setup
 void testGet_SendAndReceived()
          Create a listener.
 void testGetGroupKeys_SendAndReceived()
          Create a listener.
 void testGetGroupNames_SendAndReceived()
          Create a listener.
 void testGetMatching_WithData()
          Create a listener.
 void testReceive()
           
 void testSameKeyDifferentObject()
          Send objects with the same key but different values.
 void testSameKeyObjectDifferentValueObject()
          Send objects with the same key but different values.
 void testSimpleSend()
          Make sure we can send a bunch to the listener.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

TestTCPLateralUnitTest

public TestTCPLateralUnitTest()
Method Detail

setUp

public void setUp()
Test setup

Overrides:
setUp in class junit.framework.TestCase

testSimpleSend

public void testSimpleSend()
                    throws Exception
Make sure we can send a bunch to the listener. This would be better if we could plugin a Mock CacheManger. The listener will instantiate it on its own. We have to configure one before that.

Throws:
Exception

testReceive

public void testReceive()
                 throws Exception
Throws:
Exception

testSameKeyDifferentObject

public void testSameKeyDifferentObject()
                                throws Exception
Send objects with the same key but different values.

Throws:
Exception

testSameKeyObjectDifferentValueObject

public void testSameKeyObjectDifferentValueObject()
                                           throws Exception
Send objects with the same key but different values.

Throws:
Exception

testGet_SendAndReceived

public void testGet_SendAndReceived()
                             throws Exception
Create a listener. Add an element to the listeners cache. Setup a service. Try to get from the service.

Throws:
Exception

testGetGroupKeys_SendAndReceived

public void testGetGroupKeys_SendAndReceived()
                                      throws Exception
Create a listener. Add an element to the listeners cache. Setup a service. Try to get group keys from the service.

Throws:
Exception

testGetGroupNames_SendAndReceived

public void testGetGroupNames_SendAndReceived()
                                       throws Exception
Create a listener. Add an element to the listeners cache. Setup a service. Try to get group names from the service.

Throws:
Exception

testGetMatching_WithData

public void testGetMatching_WithData()
                              throws Exception
Create a listener. Add an element to the listeners cache. Setup a service. Try to get from the service.

Throws:
Exception


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