Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
1 package org.apidesign.stateful.api;
3 import junit.framework.TestCase;
4 import org.apidesign.stateful.api.ProgressStateless.InProgress;
6 public class ProgressTest extends TestCase {
8 public ProgressTest(String testName) {
12 public void testProgressStatefulWithoutStart() {
14 // BEGIN: progress.wrong.order
15 ProgressStateful p = ProgressStateful.create("WrongOrder");
18 // END: progress.wrong.order
20 fail("Calling progress without start yields an exception!?");
21 } catch (IllegalStateException ex) {
26 public void testProgressStatelessNeedsStart() {
27 ProgressStateless p = ProgressStateless.create("GoodOrder");
28 InProgress progress = p.start(10);
29 // without calling start(), there is no way to call progress() method
30 progress.progress(10);