JUnit Class for testing:
- Annotations
- @Test, @Before, @After, @BeforeClass, @AfterClass, @Ignore
Code:
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
public class myJUnit1 {
//No main() method, so JUnit will take over
@BeforeClass
public static void mBeforeTestClass(){
System.out.println("--------ClassBegin------------------");
}
//Annotation: Before EACH @Test
@Before
public void mBeforeTest(){