org.springframework.binding.value.support
Class BufferedValueModelTests

Show UML class diagram
java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.richclient.test.SpringRichTestCase
              extended by org.springframework.binding.value.support.BufferedValueModelTests
All Implemented Interfaces:
junit.framework.Test

public final class BufferedValueModelTests
extends SpringRichTestCase

Tests class BufferedValueModel.

Author:
Jeanette Winzenburg, Karsten Lentzsch, Oliver Hutchison

Field Summary
 
Fields inherited from class org.springframework.richclient.test.SpringRichTestCase
applicationServices, logger
 
Constructor Summary
BufferedValueModelTests()
           
 
Method Summary
protected  void doSetUp()
          Should be implemented in subclasses as an alternative to the final method SpringRichTestCase.setUp()
 void testCommitChangesWrappedValue()
          Tests the core of a commit: buffer changes are written through on commit and change the wrapped value.
 void testCommitFiresChangeOnDifferentOldAndNewValues()
           
 void testCommitFiresNoChangeOnSameOldAndNewValues()
          Checks and verifies that a commit fires no value change.
 void testCommitTriggerChange()
          Checks that #setCommitTrigger changes the commit trigger.
 void testDetectedWrappedValueChangeIfValueAssigned()
           
 void testFiresBufferingChanges()
          Tests that changing the buffering state fires changes of the buffering property.
 void testFlushFiresTrueValueChanges()
          Tests that a flush event fires a value change if and only if the flushed value does not equal the buffered value.
 void testFlushResetsTheBufferedValue()
          Tests the core of a flush action: buffer changes are overridden by wrapped changes after a flush.
 void testGetWrappedValueModel()
           
 void testIgnoresWrappedChangesIfValueAssigned()
          Tests that wrapped changes are propagated once a value has been assigned, i.e.
 void testIsBufferingIfValueAssigned()
          Tests that the buffer is buffering once a value has been assigned.
 void testIsNotBufferingAfterCommit()
          Tests that the buffer is not buffering after a commit.
 void testIsNotBufferingAfterFlush()
          Tests that the buffer is not buffering after a flush.
 void testIsNotBufferingIfNoValueAssigned()
          Tests that a buffer isn't buffering as long as no value has been assigned.
 void testListensToCurrentCommitTrigger()
          Checks and verifies that commit and flush events are driven by the current commit trigger.
 void testPropagatesWrappedChangesIfNoValueAssigned()
          Checks that wrapped changes fire value changes if no value has been assigned.
 void testReadOnly()
          Tests read actions on a read-only model.
 void testReturnsBufferedValueIfValueAssigned()
          Tests that the BufferedValueModel returns the buffered values once a value has been assigned.
 void testReturnsWrappedValueAfterCommit()
          Tests that the BufferedValueModel returns the wrapped's values after a commit.
 void testReturnsWrappedValueAfterFlush()
          Tests that the BufferedValueModel returns the wrapped's values after a flush.
 void testReturnsWrappedValueIfNoValueAssigned()
           
 void testSetValueSendsProperValueChangeEvents()
           
 void testValueChangeSendsProperValueChangeEvents()
           
 void testWrappedValuesUnchangedBeforeCommit()
          Tests the core of the buffering feature: buffer modifications do not affect the wrapped before a commit.
 
Methods inherited from class org.springframework.richclient.test.SpringRichTestCase
createApplicationContext, createApplicationLifecycleAdvisor, doTearDown, getApplicationServices, registerAdditionalServices, registerBasicServices, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferedValueModelTests

public BufferedValueModelTests()
Method Detail

doSetUp

protected void doSetUp()
                throws Exception
Description copied from class: SpringRichTestCase
Should be implemented in subclasses as an alternative to the final method SpringRichTestCase.setUp()

Overrides:
doSetUp in class SpringRichTestCase
Throws:
Exception

testGetWrappedValueModel

public void testGetWrappedValueModel()

testReturnsWrappedValueIfNoValueAssigned

public void testReturnsWrappedValueIfNoValueAssigned()

testReturnsBufferedValueIfValueAssigned

public void testReturnsBufferedValueIfValueAssigned()
Tests that the BufferedValueModel returns the buffered values once a value has been assigned.


testDetectedWrappedValueChangeIfValueAssigned

public void testDetectedWrappedValueChangeIfValueAssigned()

testReturnsWrappedValueAfterCommit

public void testReturnsWrappedValueAfterCommit()
Tests that the BufferedValueModel returns the wrapped's values after a commit.


testReturnsWrappedValueAfterFlush

public void testReturnsWrappedValueAfterFlush()
Tests that the BufferedValueModel returns the wrapped's values after a flush.


testWrappedValuesUnchangedBeforeCommit

public void testWrappedValuesUnchangedBeforeCommit()
Tests the core of the buffering feature: buffer modifications do not affect the wrapped before a commit.


testCommitChangesWrappedValue

public void testCommitChangesWrappedValue()
Tests the core of a commit: buffer changes are written through on commit and change the wrapped value.


testFlushResetsTheBufferedValue

public void testFlushResetsTheBufferedValue()
Tests the core of a flush action: buffer changes are overridden by wrapped changes after a flush.


testIsNotBufferingIfNoValueAssigned

public void testIsNotBufferingIfNoValueAssigned()
Tests that a buffer isn't buffering as long as no value has been assigned.


testIsBufferingIfValueAssigned

public void testIsBufferingIfValueAssigned()
Tests that the buffer is buffering once a value has been assigned.


testIsNotBufferingAfterCommit

public void testIsNotBufferingAfterCommit()
Tests that the buffer is not buffering after a commit.


testIsNotBufferingAfterFlush

public void testIsNotBufferingAfterFlush()
Tests that the buffer is not buffering after a flush.


testFiresBufferingChanges

public void testFiresBufferingChanges()
Tests that changing the buffering state fires changes of the buffering property.


testSetValueSendsProperValueChangeEvents

public void testSetValueSendsProperValueChangeEvents()

testValueChangeSendsProperValueChangeEvents

public void testValueChangeSendsProperValueChangeEvents()

testCommitTriggerChange

public void testCommitTriggerChange()
Checks that #setCommitTrigger changes the commit trigger.


testListensToCurrentCommitTrigger

public void testListensToCurrentCommitTrigger()
Checks and verifies that commit and flush events are driven by the current commit trigger.


testPropagatesWrappedChangesIfNoValueAssigned

public void testPropagatesWrappedChangesIfNoValueAssigned()
Checks that wrapped changes fire value changes if no value has been assigned.


testIgnoresWrappedChangesIfValueAssigned

public void testIgnoresWrappedChangesIfValueAssigned()
Tests that wrapped changes are propagated once a value has been assigned, i.e. the buffer is buffering.


testCommitFiresNoChangeOnSameOldAndNewValues

public void testCommitFiresNoChangeOnSameOldAndNewValues()
Checks and verifies that a commit fires no value change.


testCommitFiresChangeOnDifferentOldAndNewValues

public void testCommitFiresChangeOnDifferentOldAndNewValues()

testFlushFiresTrueValueChanges

public void testFlushFiresTrueValueChanges()
Tests that a flush event fires a value change if and only if the flushed value does not equal the buffered value.


testReadOnly

public void testReadOnly()
Tests read actions on a read-only model.



Copyright © 2004-2009 The Spring Framework. All Rights Reserved.