I am just starting my journey in the programming language of Java and I just cannot understand why I got these two errors, when I try to do a Junit test:
Access restriction: The method 'Assert.assertEquals(Object, Object)' is not API (restriction on required library 'C:\eclipse\plugins\org.junit_4.12.0.v201504281640\junit.jar') ConcateTest.java /TestProject/src/test line 13 Java Problem
Access restriction: The type 'Test' is not API (restriction on required library 'C:\eclipse\plugins\org.junit_4.12.0.v201504281640\junit.jar') ConcateTest.java /TestProject/src/test line 5 Java Problem
If you wonder what I have written so far I just leave it here:
package test;
import static org.junit.Assert.*;
import org.junit.Test;
public class ConcateTest {
public void testConcatenate() {
Junit test = new Junit();
String result= test.Concatenate("one","two");
assertEquals("onetwo",result);
}
}
And this is how my Junit
class looks like:
package test;
public class Junit {
public String Concatenate(String one,String two)
{
return one+two;
}
public int Multiply(int number1,int number2)
{
return number1*number2;
}
}
I would very much appreciate it if somebody would tell me how I can fix this problem, thanks in advance!