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