I'm trying to write my first unit tests for a calculator, but NetBeans says it can't find the symbol assertEquals
and annotation @Test
.
Should i include something?
I'm using NetBeans 7.3.1 and W7.
package calculator;
import org.junit.Assert.*;
public class UnitTests{
@Test
public void checkAdd(){
assertEquals(2, Calculator.rpnCalc(" 2 3 + "));
}
}
EDIT: Thanks guys, importing it as static helped. Test annotation required only including
import org.junit.Test;