org.eigenbase.test
Class PropertyTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.test.PropertyTest
All Implemented Interfaces:
Test

public class PropertyTest
extends TestCase

Unit test for properties system (TriggerableProperties, IntegerProperty and the like).

Since:
July 6, 2005
Version:
$Id: //open/dev/farrago/src/org/eigenbase/test/PropertyTest.java#13 $
Author:
jhyde

Nested Class Summary
private static class PropertyTest.MyProperties
           
private static class PropertyTest.State
           
private static class PropertyTest.State2
           
private static class PropertyTest.State3
           
 
Field Summary
private static boolean[] FalseTrue
           
 
Constructor Summary
PropertyTest()
           
 
Method Summary
private  void checkVetoChangeValue(boolean persistent, boolean save)
          Checks that one can veto a property change.
 void testBoolean()
           
 void testBooleanNoDefault()
           
 void testDouble()
           
 void testDoubleLimit()
           
 void testDoubleLimitNoDefault()
           
 void testDoubleNoDefault()
           
 void testInt()
           
 void testIntLimit()
           
 void testIntLimitNoDefault()
           
 void testIntNoDefault()
           
 void testString()
           
 void testStringNoDefault()
           
 void testTrigger()
           
 void testTriggerCallOrder()
          Checks that triggers are called in the correct order.
 void testValueChange()
          Tests that trigger is called after the value is changed
 void testVetoChangeValue()
           
 void testVetoChangeValueManyTimes()
          Runs testVetoChangeValue() many times, to test concurrency.
 void testVetoChangeValuePersistent()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FalseTrue

private static final boolean[] FalseTrue
Constructor Detail

PropertyTest

public PropertyTest()
Method Detail

testInt

public void testInt()

testIntNoDefault

public void testIntNoDefault()

testIntLimit

public void testIntLimit()

testIntLimitNoDefault

public void testIntLimitNoDefault()

testDouble

public void testDouble()

testDoubleNoDefault

public void testDoubleNoDefault()

testDoubleLimit

public void testDoubleLimit()

testDoubleLimitNoDefault

public void testDoubleLimitNoDefault()

testString

public void testString()

testStringNoDefault

public void testStringNoDefault()

testBoolean

public void testBoolean()

testBooleanNoDefault

public void testBooleanNoDefault()

testTrigger

public void testTrigger()

testValueChange

public void testValueChange()
Tests that trigger is called after the value is changed


testTriggerCallOrder

public void testTriggerCallOrder()
Checks that triggers are called in the correct order.


testVetoChangeValue

public void testVetoChangeValue()
                         throws Exception
Throws:
Exception

testVetoChangeValuePersistent

public void testVetoChangeValuePersistent()
                                   throws Exception
Throws:
Exception

checkVetoChangeValue

private void checkVetoChangeValue(boolean persistent,
                                  boolean save)
                           throws Exception
Checks that one can veto a property change.

Parameters:
persistent - Whether to make strong references to triggers, to prevent them from being garbage collected
save - Whether to keep a pointer to each trigger on the stack, to prevent them from being garbage collected
Throws:
Exception

testVetoChangeValueManyTimes

public void testVetoChangeValueManyTimes()
                                  throws Exception
Runs testVetoChangeValue() many times, to test concurrency.

Throws:
Exception