diff -r 000000000000 -r 907f5d8e343c samples/deadlock/test/org/apidesign/deadlock/startuplock/CLIHandlerBlockingWithNbTestCaseTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/samples/deadlock/test/org/apidesign/deadlock/startuplock/CLIHandlerBlockingWithNbTestCaseTest.java Sat Jun 14 09:54:32 2008 +0200 @@ -0,0 +1,35 @@ +package org.apidesign.deadlock.startuplock; + +import java.io.File; +import java.util.logging.Handler; +import java.util.logging.Level; +import java.util.logging.LogRecord; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.netbeans.junit.NbTestCase; +import static org.junit.Assert.*; + +// BEGIN: test.capture.logs.nbjunit +public class CLIHandlerBlockingWithNbTestCaseTest extends NbTestCase { + + public CLIHandlerBlockingWithNbTestCaseTest(String s) { + super(s); + } + + @Override + protected Level logLevel() { + return Level.ALL; + } + + + public void testStart() throws Exception { + File lockFile = File.createTempFile("pref", ".tmp"); + int result = CLIHandlerBlocking.start(lockFile); + assertEquals("Show a failure", -10, result); + } +} +// END: test.capture.logs.nbjunit