diff -r 26f9a0ec4315 -r b8edf9de56c5 samples/stateful/test/org/apidesign/stateful/api/ProgressStatefulTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/samples/stateful/test/org/apidesign/stateful/api/ProgressStatefulTest.java Sun May 02 14:35:48 2010 +0200 @@ -0,0 +1,25 @@ +package org.apidesign.stateful.api; + +import junit.framework.TestCase; + +public class ProgressStatefulTest extends TestCase { + + public ProgressStatefulTest(String testName) { + super(testName); + } + + public void testProgressWithoutStart() { + try { + // BEGIN: progress.wrong.order + ProgressStateful p = ProgressStateful.create("WrongOrder"); + p.progress(10); + p.finish(); + // END: progress.wrong.order + + fail("Calling progress without start yields an exception!?"); + } catch (IllegalStateException ex) { + // OK + } + } + +}