samples/stateful/test/org/apidesign/stateful/api/ProgressStatefulTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sun, 02 May 2010 14:35:48 +0200
changeset 350 b8edf9de56c5
parent 348 samples/stateful/test/org/apidesign/stateful/api/ProgressTest.java@26f9a0ec4315
permissions -rw-r--r--
Renaming Progress to ProgressStateful
     1 package org.apidesign.stateful.api;
     2 
     3 import junit.framework.TestCase;
     4 
     5 public class ProgressStatefulTest extends TestCase {
     6     
     7     public ProgressStatefulTest(String testName) {
     8         super(testName);
     9     }
    10 
    11     public void testProgressWithoutStart() {
    12         try {
    13             // BEGIN: progress.wrong.order
    14             ProgressStateful p = ProgressStateful.create("WrongOrder");
    15             p.progress(10);
    16             p.finish();
    17             // END: progress.wrong.order
    18             
    19             fail("Calling progress without start yields an exception!?");
    20         } catch (IllegalStateException ex) {
    21             // OK
    22         }
    23     }
    24 
    25 }