junit-annotation

Möchte ich die GUI starten Anwendung 2 mal von der Java-test. Wie sollten wir nutzen @annotation in diesem Fall?

public class Toto { 

    @BeforeClass 
    public static void setupOnce() { 
        final Thread thread = new Thread() {
            public void run() {
               //launch appli
            }
        }; 
        try { 
            thread.start(); 
        } catch (Exception ex) { } 
    }
} 
public class Test extends toto {
    @Test 
    public void test() {
        setuptonce(); 
        closeAppli(); 
    } 

    @test 
    public void test2() 
    {
        setuptonce(); 
    } 
}

Starten, es ein zweites mal, die Anmerkung sollte ich verwenden? @afterclass?

InformationsquelleAutor user281070 | 2010-03-18
Schreibe einen Kommentar