I'm having all sorts of trouble running JUnit in Visual Studio Code. I have had two main problems that do not co-exist in each all the projects I've created.
Problem 1: After creating and running a Java project, if I attempt to add a JUnit test class, the program cannot find the class/test. I should see an option to run or debug my test, but no such option pops up. Also when I click on the test Explorer tab, I don't see the test class listed, but it is in the project folder.
Problem 2: I have had some success with importing a project first developed in eclipse into VS code. This is not really ideal. When doing this the issue I have is that VS Code has troubles with the JUnit imports. Sometimes it does not recognize the annotation @Test and will attempt to solve the import troubles by having me at the import within the program, (Example: When using assertSame method I would have to write:
org.junit.Assert.assertEquals("stringName", v1.getName);
Has anyone had similar problems, or does anyone have some insight on how to run a java project without a maven or another project manager? I'm sure there is a way to make this work, but I feel like I'm missing the obvious.