I'm trying to create a unit test suite in IntelliJ however the @Test function is crossed out and say's it is depricated, and when I try run a simple test the console say's no tests were found.
package test;
import assignment.Game;
import org.junit.Test;
import org.junit.After;
import org.junit.Before;
import org.junit.Assert;
public class NaughtsCrossesTest {
//Game game;
@Before
public void setUp() throws Exception {
//game = new Game();
}
@After
public void tearDown() throws Exception {
}
@Test
public void testDiagonalWin() throws Exception{
System.out.println("hello");
}
in the screenshot below you can see that test is crossed out
and it results in this happening
when i hover over test it says it is depricated (im new to java so dont know what that means) but offers no results in how to fix it. any help would be appreciated. I tried adding and removing throws exception out of the "testdiagaonalwin" function but that did nothing.
i'll just specify its java8 and junit4 i am using.
SOLVED: invalidated cache and restart fixed it