Home | History | Annotate | Download | only in junitparams
      1 package junitparams;
      2 
      3 import static org.assertj.core.api.Assertions.assertThat;
      4 
      5 import org.junit.*;
      6 import org.junit.runner.*;
      7 
      8 @RunWith(JUnitParamsRunner.class)
      9 public class BeforeAfterClassTest {
     10 
     11     private static boolean val = false;
     12 
     13     @BeforeClass
     14     public static void before() {
     15         val = true;
     16     }
     17 
     18     @AfterClass
     19     public static void after() {
     20         val = false;
     21     }
     22 
     23     @Test
     24     @Parameters({ " " })
     25     public void test(String param) {
     26         assertThat(val).isTrue();
     27     }
     28 }
     29