org.springframework.binding.form.support
Class AbstractFormModelTests

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.form.support.AbstractFormModelTests
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
DefaultFormModelTests

public abstract class AbstractFormModelTests
extends SpringRichTestCase

Tests for

Author:
Oliver Hutchison

Nested Class Summary
protected static class AbstractFormModelTests.BooleanStatelistener
          Listener to register on boolean properties to check if they are in the expected state.
static class AbstractFormModelTests.TestCommitListener
           
 class AbstractFormModelTests.TestConversionService
           
 
Field Summary
 
Fields inherited from class org.springframework.richclient.test.SpringRichTestCase
applicationServices, logger
 
Constructor Summary
AbstractFormModelTests()
           
 
Method Summary
protected  org.springframework.binding.form.support.AbstractFormModel getFormModel(org.springframework.binding.support.BeanPropertyAccessStrategy pas, boolean buffering)
           
protected  org.springframework.binding.form.support.AbstractFormModel getFormModel(Object formObject)
           
protected  org.springframework.binding.form.support.AbstractFormModel getFormModel(org.springframework.binding.value.ValueModel valueModel, boolean buffering)
           
 void testBufferedDoesNotWriteThrough()
           
 void testBufferedFormModelSetFormObjectNotDirty()
           Summary: Setting a new FormObject should always result in a clean model (not dirty).
 void testCommitEvents()
           
 void testCommitWritesBufferingThrough()
           
 void testConvertingValueModels()
           
 void testDirtyTracking(boolean buffering)
           
 void testDirtyTrackingWithBuffering()
           
 void testDirtyTrackingWithoutBuffering()
           
 void testDirtyTracksKids()
          Test on dirty state of parent-child relations.
 void testEnabledEvents()
           
 void testEnabledTracksParent()
           
 void testFieldMetadata()
           
 void testFormModelSetFormObjectNotDirty()
           Summary: Setting a new FormObject should always result in a clean model (not dirty).
 void testFormObjectChangeEventComesBeforePropertyChangeEvent()
           
 void testFormObjectChangeEvents()
           
 void testFormPropertiesAreAccessableFromFormObjectChangeEvents()
           
 void testGetValueModelFromPAS()
           
 void testParentChildDirtyState()
           Test whether the dirty state is correctly propagated between parent-child formModel and that the proper events are fired.
 void testParentChildEnabledState()
           Test whether the enabled state is correctly propagated between parent-child formModel and that the proper events are fired.
 void testParentChildReadOnlyState()
           Test whether the read-only state is correctly propagated between parent-child formModel and that the proper events are fired.
 void testRevert(boolean buffering)
           
 void testRevertWithBuffering()
           
 void testRevertWithoutBuffering()
           
 void testSetFormObjectDoesNotRevertChangesToPreviousFormObject()
           
 void testSetFormObjectUpdatesDirtyState()
           
 void testUnbufferedWritesThrough()
           
 
Methods inherited from class org.springframework.richclient.test.SpringRichTestCase
createApplicationContext, createApplicationLifecycleAdvisor, doSetUp, 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

AbstractFormModelTests

public AbstractFormModelTests()
Method Detail

getFormModel

protected org.springframework.binding.form.support.AbstractFormModel getFormModel(Object formObject)

getFormModel

protected org.springframework.binding.form.support.AbstractFormModel getFormModel(org.springframework.binding.support.BeanPropertyAccessStrategy pas,
                                                                                  boolean buffering)

getFormModel

protected org.springframework.binding.form.support.AbstractFormModel getFormModel(org.springframework.binding.value.ValueModel valueModel,
                                                                                  boolean buffering)

testGetValueModelFromPAS

public void testGetValueModelFromPAS()

testUnbufferedWritesThrough

public void testUnbufferedWritesThrough()

testBufferedDoesNotWriteThrough

public void testBufferedDoesNotWriteThrough()

testDirtyTrackingWithBuffering

public void testDirtyTrackingWithBuffering()

testDirtyTrackingWithoutBuffering

public void testDirtyTrackingWithoutBuffering()

testDirtyTracking

public void testDirtyTracking(boolean buffering)

testDirtyTracksKids

public void testDirtyTracksKids()
Test on dirty state of parent-child relations. When child gets dirty, parent should also be dirty. When parent reverts, child should revert too.


testSetFormObjectDoesNotRevertChangesToPreviousFormObject

public void testSetFormObjectDoesNotRevertChangesToPreviousFormObject()

testCommitEvents

public void testCommitEvents()

testCommitWritesBufferingThrough

public void testCommitWritesBufferingThrough()

testRevertWithBuffering

public void testRevertWithBuffering()

testRevertWithoutBuffering

public void testRevertWithoutBuffering()

testRevert

public void testRevert(boolean buffering)

testEnabledEvents

public void testEnabledEvents()

testEnabledTracksParent

public void testEnabledTracksParent()

testConvertingValueModels

public void testConvertingValueModels()

testFieldMetadata

public void testFieldMetadata()

testSetFormObjectUpdatesDirtyState

public void testSetFormObjectUpdatesDirtyState()

testFormPropertiesAreAccessableFromFormObjectChangeEvents

public void testFormPropertiesAreAccessableFromFormObjectChangeEvents()

testFormObjectChangeEventComesBeforePropertyChangeEvent

public void testFormObjectChangeEventComesBeforePropertyChangeEvent()

testFormObjectChangeEvents

public void testFormObjectChangeEvents()

testBufferedFormModelSetFormObjectNotDirty

public void testBufferedFormModelSetFormObjectNotDirty()

Summary: Setting a new FormObject should always result in a clean model (not dirty). Using buffered=true.

This test checks that when a valueModel is dirty and a new FormObject is set which has the same value for that valueModel, the formModel should not be dirty.


testFormModelSetFormObjectNotDirty

public void testFormModelSetFormObjectNotDirty()

Summary: Setting a new FormObject should always result in a clean model (not dirty). Using buffered=false.

This test checks that when a valueModel is dirty and a new FormObject is set which has the same value for that valueModel, the formModel should not be dirty.


testParentChildEnabledState

public void testParentChildEnabledState()

Test whether the enabled state is correctly propagated between parent-child formModel and that the proper events are fired.

In detail:


testParentChildReadOnlyState

public void testParentChildReadOnlyState()

Test whether the read-only state is correctly propagated between parent-child formModel and that the proper events are fired.

In detail:


testParentChildDirtyState

public void testParentChildDirtyState()

Test whether the dirty state is correctly propagated between parent-child formModel and that the proper events are fired.

In detail:



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