jtulach@348: package org.apidesign.stateful.api; jtulach@348: jtulach@348: import junit.framework.TestCase; jtulach@348: jtulach@350: public class ProgressStatefulTest extends TestCase { jtulach@348: jtulach@350: public ProgressStatefulTest(String testName) { jtulach@348: super(testName); jtulach@348: } jtulach@348: jtulach@348: public void testProgressWithoutStart() { jtulach@348: try { jtulach@348: // BEGIN: progress.wrong.order jtulach@350: ProgressStateful p = ProgressStateful.create("WrongOrder"); jtulach@348: p.progress(10); jtulach@348: p.finish(); jtulach@348: // END: progress.wrong.order jtulach@348: jtulach@348: fail("Calling progress without start yields an exception!?"); jtulach@348: } catch (IllegalStateException ex) { jtulach@348: // OK jtulach@348: } jtulach@348: } jtulach@348: jtulach@348: }