samples/deadlock/test/org/apidesign/deadlock/startuplock/CLIHandlerBlockingWithNbTestCaseTest.java
1 package org.apidesign.deadlock.startuplock;
4 import java.util.logging.Level;
5 import org.netbeans.junit.NbTestCase;
6 import static org.junit.Assert.*;
8 // BEGIN: test.capture.logs.nbjunit
9 public class CLIHandlerBlockingWithNbTestCaseTest extends NbTestCase {
11 public CLIHandlerBlockingWithNbTestCaseTest(String s) {
16 protected Level logLevel() {
21 public void testStart() throws Exception {
22 File lockFile = File.createTempFile("pref", ".tmp");
23 int result = CLIHandlerBlocking.start(lockFile);
24 if (Boolean.getBoolean("no.failures")) return;
25 assertEquals("Show a failure", -10, result);
28 // END: test.capture.logs.nbjunit