eclipse / lsp4jakarta

Language Server for Jakarta EE
Eclipse Public License 2.0
33 stars 51 forks source link

#305 Improving automated tests for diagnostics and quick-fixes #483

Closed aparnamichael closed 1 year ago

aparnamichael commented 1 year ago

Added test case for verifying whether we are using the fully qualified name to provide diagnostics.

turkeylurkey commented 1 year ago

The failure in the tests is:

Caused by: java.io.FileNotFoundException: /home/runner/work/lsp4jakarta/lsp4jakarta/jakarta.jdt/org.eclipse.lsp4jakarta.jdt.test/target/workingProjects/jakarta-noDiagnostic-sample/.project (No such file or directory)

Possibly copying the .project from jakarta-sample could work but need to examine if the directory name is in the file.

TrevCraw commented 1 year ago

@aparnamichael did you try running a negative test to confirm that the test fails if Jakarta diagnostics are found in one of the test project files?

aparnamichael commented 1 year ago

@aparnamichael did you try running a negative test to confirm that the test fails if Jakarta diagnostics are found in one of the test project files?

Yes tested the negative scenario. User will get an error message in the same format like diagnostic test cases failure.

Failures: NoDiagnosticsTest.checkForNoDiagnostics:58 Unexpected diagnostics: expected:<[]> but was:<[Diagnostic [ range = Range [ start = Position [ line = 13 character = 4 ] .... ]

turkeylurkey commented 1 year ago

Fixes #305