samples/deadlock/test/org/apidesign/deadlock/startuplock/CLIHandlerBlockingWithNbTestCaseTest.java
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/deadlock/test/org/apidesign/deadlock/startuplock/CLIHandlerBlockingWithNbTestCaseTest.java Sat Jun 14 09:54:32 2008 +0200
1.3 @@ -0,0 +1,35 @@
1.4 +package org.apidesign.deadlock.startuplock;
1.5 +
1.6 +import java.io.File;
1.7 +import java.util.logging.Handler;
1.8 +import java.util.logging.Level;
1.9 +import java.util.logging.LogRecord;
1.10 +import java.util.logging.Logger;
1.11 +import org.junit.After;
1.12 +import org.junit.AfterClass;
1.13 +import org.junit.Before;
1.14 +import org.junit.BeforeClass;
1.15 +import org.junit.Test;
1.16 +import org.netbeans.junit.NbTestCase;
1.17 +import static org.junit.Assert.*;
1.18 +
1.19 +// BEGIN: test.capture.logs.nbjunit
1.20 +public class CLIHandlerBlockingWithNbTestCaseTest extends NbTestCase {
1.21 +
1.22 + public CLIHandlerBlockingWithNbTestCaseTest(String s) {
1.23 + super(s);
1.24 + }
1.25 +
1.26 + @Override
1.27 + protected Level logLevel() {
1.28 + return Level.ALL;
1.29 + }
1.30 +
1.31 +
1.32 + public void testStart() throws Exception {
1.33 + File lockFile = File.createTempFile("pref", ".tmp");
1.34 + int result = CLIHandlerBlocking.start(lockFile);
1.35 + assertEquals("Show a failure", -10, result);
1.36 + }
1.37 +}
1.38 +// END: test.capture.logs.nbjunit