samples/deadlock/test/org/apidesign/deadlock/startuplock/CLIHandlerBlockingWithNbTestCaseTest.java
1 package org.apidesign.deadlock.startuplock;
4 import java.util.logging.Handler;
5 import java.util.logging.Level;
6 import java.util.logging.LogRecord;
7 import java.util.logging.Logger;
8 import org.junit.After;
9 import org.junit.AfterClass;
10 import org.junit.Before;
11 import org.junit.BeforeClass;
12 import org.junit.Test;
13 import org.netbeans.junit.NbTestCase;
14 import static org.junit.Assert.*;
16 // BEGIN: test.capture.logs.nbjunit
17 public class CLIHandlerBlockingWithNbTestCaseTest extends NbTestCase {
19 public CLIHandlerBlockingWithNbTestCaseTest(String s) {
24 protected Level logLevel() {
29 public void testStart() throws Exception {
30 File lockFile = File.createTempFile("pref", ".tmp");
31 int result = CLIHandlerBlocking.start(lockFile);
32 assertEquals("Show a failure", -10, result);
35 // END: test.capture.logs.nbjunit