jtulach@348: package org.apidesign.stateful.api; jtulach@348: jtulach@348: import junit.framework.TestCase; jtulach@348: jtulach@348: public class ProgressTest extends TestCase { jtulach@348: jtulach@348: public ProgressTest(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@348: Progress p = Progress.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: }