This is my first JUnit test and I don't understand why is not throwing an AssertionError
, what am I doing wrong??
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.JUnitCore;
public class MyFirstJUnitTest {
public static void main(String[] args) {
JUnitCore.runClasses(MyFirstJUnitTest.class);
}
@Test
public void simpleAdd() {
int a = 5;
int b = 3;
int c = a + b; //8
Assert.assertTrue(c == 7);
}
}