Getting Test Infected with JUnit Testing

Test is one of the most crucial stage in Software Development. Testing ensures that program is doing what it’s supposed to do. JUnit is an open source testing framework developed by Erich Gamma and Kent Beck. The framework is very simple, yet it allows you to do all the key things you need for testing.

Annotation Description
@Test Annotating Method as TestCase
@Before Run Before executing of Each Test
@BeforeClass Before Running TestCases in the Class
@After After executing of Each Test
@AfterClass After Completing TestCases in the Class

Tests using JUnit