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