I'm using JUnit.I have a test method to test a method and some test cases. I want to run all tes case in that test method, but I can't do that. When first test case fail, test method don't run second test case
Here is my code
public class ComputeServiceTest extends TestCase {
//test add method
public void testAdd()
{
ComputeServices instance = new ComputeServices();
//First test case
int x1 = 7;
int y1 = 5;
int expResult1 = 13;
int result1 = instance.add(x1, y1);
assertEquals("First test case fail",expResult1, result1);
// Second test case
int x2 = 9;
int y2 = 6;
int expResult2 = 15;
int result2 = instance.add(x2, y2);
assertEquals("Second test case fail",expResult2, result2);
}
How can I do that?