Tag Archives: JUnit
JUNIT Test Suit
Test suite
Test suite means bundle a few unit test cases and run it together.
In Junit both @RunWith and @Suite annotation are used to run the suite test.
Example:
1.)import org.junit.*;
import static org.junit.Assert.*;
import java.util.*;
public...
Testing Exception with JUNIT
Testing Exception with Junit
This tutorial will explain the how to check the expected exception throws in a function.
The expected parameter is used along with @Test annotation likeĀ @Test(expected)in action.
Example:Jex.java:
import org.junit.Test;
import...