samples/deadlock/test/org/apidesign/deadlock/startuplock/CLIHandlerBlockingWithNbTestCaseTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 18:51:38 +0200
changeset 263 7e8e995065c5
parent 107 907f5d8e343c
permissions -rw-r--r--
Tests of all modules are executed and can fail the build
     1 package org.apidesign.deadlock.startuplock;
     2 
     3 import java.io.File;
     4 import java.util.logging.Level;
     5 import org.netbeans.junit.NbTestCase;
     6 import static org.junit.Assert.*;
     7 
     8 // BEGIN: test.capture.logs.nbjunit
     9 public class CLIHandlerBlockingWithNbTestCaseTest extends NbTestCase {
    10 
    11     public CLIHandlerBlockingWithNbTestCaseTest(String s) {
    12         super(s);
    13     }
    14 
    15     @Override
    16     protected Level logLevel() {
    17         return Level.ALL;
    18     }
    19     
    20     
    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);
    26     }
    27 }
    28 // END: test.capture.logs.nbjunit