com.hammurapi.eventbus.tests
Class LocalEventBusTests

Show UML class diagram
java.lang.Object
  extended by com.hammurapi.eventbus.tests.LocalEventBusTests

public class LocalEventBusTests
extends Object


Nested Class Summary
static class LocalEventBusTests.ObservableStringReference
           
 
Constructor Summary
LocalEventBusTests()
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testBinderCompiler()
           
 void testCompiledFamilyTies()
           
 void testCompiledJoin()
           
 void testConsumeJoin()
           
 void testFamilyTies()
           
 void testFamilyTiesBindingCompilation()
           
 void testFamilyTiesJmx()
           
 void testFaulty()
           
 void testFireJoinRemoveHandler()
          - Post 1st event, validate not fired - Post 2nd event, validate not fired - Remove 2nd event, validate fired - Remove 1st event, validate not fired
 void testHandleJoin()
           
 void testInifinite()
           
 void testJoin()
           
 void testJoinWithCost()
           
 void testLoop()
           
 void testMoreRestrictive()
           
 void testOneOff()
           
 void testOppositeChaining()
           
 void testParallelExecution()
           
 void testParameterizedStringHandlerWithMethodCondition()
           
 void testParameterNamesJoin()
           
 void testPost()
           
 void testPredicateChaining()
           
 void testPriority()
           
 void testRemoveHandler()
           
 void testRemoveHandlers()
          - Post event - Validate that remove handler not fired - Remove event - Validate event handler fired
 void testRemoveWithBus()
          - Post event to the bus - Check presence - Remove event using bus.remove() - Check that event is gone from the store.
 void testRemoveWithHandle()
          - Post event to the bus - Check presence - Remove event using Handle.remove() - Check that event is gone from the store.
 void testReset()
           
 void testSimpleStringHandler()
           
 void testSimpleStringHandler2()
           
 void testStringHandlerWithMethodCondition()
           
 void testStringHandlerWithParameterCondition()
           
 void testTokenParameterizedStringHandlerWithMethodCondition()
           
 void testUpdateFireRemoveHandlers()
          - Post event which matcher remove handler 1 - Update event with value which matches remove handler 2 - Verify that remove handler 1 is fired - Remove event - Verify that remove handler 2 is fired
 void testUpdateFromHandler()
          Update event through dispatch context.
 void testUpdateThroughObservable()
          - Post event which matches handler 1, verify fired - Update event to match handler 2, verify that handler 2 is fired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalEventBusTests

public LocalEventBusTests()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Throws:
Exception

testParallelExecution

public void testParallelExecution()
                           throws InterruptedException
Throws:
InterruptedException

testSimpleStringHandler

public void testSimpleStringHandler()
                             throws InterruptedException
Throws:
InterruptedException

testSimpleStringHandler2

public void testSimpleStringHandler2()
                              throws InterruptedException
Throws:
InterruptedException

testStringHandlerWithMethodCondition

public void testStringHandlerWithMethodCondition()
                                          throws InterruptedException
Throws:
InterruptedException

testStringHandlerWithParameterCondition

public void testStringHandlerWithParameterCondition()
                                             throws InterruptedException
Throws:
InterruptedException

testParameterizedStringHandlerWithMethodCondition

public void testParameterizedStringHandlerWithMethodCondition()
                                                       throws InterruptedException
Throws:
InterruptedException

testTokenParameterizedStringHandlerWithMethodCondition

public void testTokenParameterizedStringHandlerWithMethodCondition()
                                                            throws InterruptedException
Throws:
InterruptedException

testPost

public void testPost()
              throws InterruptedException
Throws:
InterruptedException

testHandleJoin

public void testHandleJoin()
                    throws InterruptedException
Throws:
InterruptedException

testJoin

public void testJoin()
              throws InterruptedException
Throws:
InterruptedException

testBinderCompiler

public void testBinderCompiler()

testFamilyTiesBindingCompilation

public void testFamilyTiesBindingCompilation()

testCompiledJoin

public void testCompiledJoin()
                      throws InterruptedException
Throws:
InterruptedException

testJoinWithCost

public void testJoinWithCost()
                      throws InterruptedException
Throws:
InterruptedException

testParameterNamesJoin

public void testParameterNamesJoin()
                            throws InterruptedException
Throws:
InterruptedException

testPriority

public void testPriority()
                  throws InterruptedException
Throws:
InterruptedException

testOneOff

public void testOneOff()
                throws InterruptedException
Throws:
InterruptedException

testConsumeJoin

public void testConsumeJoin()
                     throws InterruptedException
Throws:
InterruptedException

testPredicateChaining

public void testPredicateChaining()
                           throws InterruptedException
Throws:
InterruptedException

testOppositeChaining

public void testOppositeChaining()
                          throws InterruptedException
Throws:
InterruptedException

testMoreRestrictive

public void testMoreRestrictive()
                         throws InterruptedException
Throws:
InterruptedException

testLoop

public void testLoop()
              throws InterruptedException
Throws:
InterruptedException

testInifinite

public void testInifinite()
                   throws InterruptedException
Throws:
InterruptedException

testFaulty

public void testFaulty()
                throws InterruptedException
Throws:
InterruptedException

testRemoveHandler

public void testRemoveHandler()
                       throws InterruptedException
Throws:
InterruptedException

testReset

public void testReset()
               throws InterruptedException
Throws:
InterruptedException

testFamilyTies

public void testFamilyTies()
                    throws InterruptedException
Throws:
InterruptedException

testCompiledFamilyTies

public void testCompiledFamilyTies()
                            throws InterruptedException
Throws:
InterruptedException

testFamilyTiesJmx

public void testFamilyTiesJmx()
                       throws InterruptedException
Throws:
InterruptedException

testRemoveWithBus

public void testRemoveWithBus()
                       throws Exception
- Post event to the bus - Check presence - Remove event using bus.remove() - Check that event is gone from the store.

Throws:
Exception

testRemoveWithHandle

public void testRemoveWithHandle()
                          throws Exception
- Post event to the bus - Check presence - Remove event using Handle.remove() - Check that event is gone from the store.

Throws:
Exception

testRemoveHandlers

public void testRemoveHandlers()
                        throws Exception
- Post event - Validate that remove handler not fired - Remove event - Validate event handler fired

Throws:
Exception

testFireJoinRemoveHandler

public void testFireJoinRemoveHandler()
                               throws Exception
- Post 1st event, validate not fired - Post 2nd event, validate not fired - Remove 2nd event, validate fired - Remove 1st event, validate not fired

Throws:
Exception

testUpdateFireRemoveHandlers

public void testUpdateFireRemoveHandlers()
                                  throws Exception
- Post event which matcher remove handler 1 - Update event with value which matches remove handler 2 - Verify that remove handler 1 is fired - Remove event - Verify that remove handler 2 is fired

Throws:
Exception

testUpdateFromHandler

public void testUpdateFromHandler()
                           throws Exception
Update event through dispatch context. Verify that remove handlers for old value are fired and that post handlers for new value are fired. Use join handler or AFTER_EVENT policy.

Throws:
Exception

testUpdateThroughObservable

public void testUpdateThroughObservable()
                                 throws Exception
- Post event which matches handler 1, verify fired - Update event to match handler 2, verify that handler 2 is fired

Throws:
Exception