ch.elca.el4j.tests.util.observer
Class ObserverTest

java.lang.Object
  extended by ch.elca.el4j.tests.util.observer.ObserverTest
All Implemented Interfaces:
ValueObserver<Boolean>

public class ObserverTest
extends Object
implements ValueObserver<Boolean>

An observer test.

Author:
Adrian Moos (AMS)
File-location:
ObserverTest
Last check-in date:
2009-12-01 10:59:54 +0100 (Di, 01. Dez 2009) by jonasha for revision 4010

Field Summary
(package private)  SettableObservableValue<Boolean> m_a
          the inputs.
(package private)  SettableObservableValue<Boolean> m_b
          the inputs.
(package private)  SettableObservableValue<Boolean> m_c
          the inputs.
(package private)  Computable<Boolean> m_comp
          the computable for g.
(package private)  LiveValue<Boolean> m_e
          the intermediary nodes/outputs.
(package private)  LiveValue<Boolean> m_f
          the intermediary nodes/outputs.
(package private)  LiveValue<Boolean> m_g
          the intermediary nodes/outputs.
(package private)  int m_notified
          counts the number of change notifications received.
 
Constructor Summary
ObserverTest()
           
 
Method Summary
 void changed(Boolean newRef)
          
private  void check()
          asserts that the state is consistent.
private  void check(Boolean newRef)
          asserts that the state is consistent.
 void setUp()
          
 void testInputChange()
          tests propagation of changes.
 void testSilentSubscribe()
          tests silent subscription.
 void testSubscribe()
          tests subscription.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_a

SettableObservableValue<Boolean> m_a
the inputs.


m_b

SettableObservableValue<Boolean> m_b
the inputs.


m_c

SettableObservableValue<Boolean> m_c
the inputs.


m_e

LiveValue<Boolean> m_e
the intermediary nodes/outputs.


m_f

LiveValue<Boolean> m_f
the intermediary nodes/outputs.


m_g

LiveValue<Boolean> m_g
the intermediary nodes/outputs.


m_comp

Computable<Boolean> m_comp
the computable for g.


m_notified

int m_notified
counts the number of change notifications received.

Constructor Detail

ObserverTest

public ObserverTest()
Method Detail

setUp

public void setUp()


testSubscribe

public void testSubscribe()
tests subscription.


testSilentSubscribe

public void testSilentSubscribe()
tests silent subscription.


testInputChange

public void testInputChange()
tests propagation of changes.


check

private void check()
asserts that the state is consistent.


check

private void check(Boolean newRef)
asserts that the state is consistent.

Parameters:
newRef - g's current value

changed

public void changed(Boolean newRef)

Specified by:
changed in interface ValueObserver<Boolean>


Copyright © 2005-2011 ELCA. All Rights Reserved.