lsp4jakarta icon indicating copy to clipboard operation
lsp4jakarta copied to clipboard

Add unit tests for certain quick fixes

Open turkeylurkey opened this issue 1 year ago • 1 comments

There are unit tests for some quick fixes but there are none for the following diagnostics.

Bean Validation

  • The @DecimalMax/@DecimalMin/@Digits annotation can only be used on: BigDecimal... etc.
  • The @Email annotation can only be used on String...
  • The @Min/@Max annotation can only be used on BigDecimal, ... etc
  • The @Negative/@NegativeOrZero/@Positive/@PositiveOrZero annotation can only be used on BigDecimal, ... etc
  • The @NotBlank/@Pattern annotation can only be used on String and CharSequence type fields or methods.

turkeylurkey avatar May 28 '24 22:05 turkeylurkey

WebSocket

  • A unit test exists for inserting the @PathParam annotation on to method parameters but does not verify all the code actions for all the diagnostics produced by the test resource. See io.openliberty.sample.jakarta.websocket.AnnotationTest and org.eclipse.lsp4jakarta.jdt.websocket.JakartaWebSocketTest.addPathParamsAnnotation(). The test should also verify the quick fixes for the public void OnClose(Session session, Integer missingAnnotation1, String missingAnnotation2) method.

mrglavas avatar May 29 '24 18:05 mrglavas

Contains more test cases for

  • [x] Future and FuturePresent Annotation Quick fix test cases
  • [x] Past and PastOrPresent Annotation quick fix test cases

archana-1924 avatar Aug 28 '25 07:08 archana-1924

I just saw the pull request that included the last few tests. It looks like all the tests have been addressed.

turkeylurkey avatar Sep 02 '25 14:09 turkeylurkey

I just saw the pull request that included the last few tests. It looks like all the tests have been addressed.

All the annotations mentioned are addressed and tested.

archana-1924 avatar Sep 02 '25 17:09 archana-1924