Quickfix sorting. Preferred fix. Wording for RequestMapping quickfixes

This commit is contained in:
aboyko
2023-09-26 22:07:19 -04:00
parent e41f45dc8f
commit d1e9ed51ea
10 changed files with 183 additions and 20 deletions

View File

@@ -81,7 +81,7 @@ public class NoRequestMappingAnnotationReconcilerTest extends BaseReconcilerTest
assertEquals("@RequestMapping(value = \"/1\", method = RequestMethod.GET)", markedStr);
assertEquals(3, problem.getQuickfixes().size());
assertEquals("Replace with '@GetMapping'", problems.get(0).getQuickfixes().get(0).title);
assertEquals("Replace with `@GetMapping`", problems.get(0).getQuickfixes().get(0).title);
}
@@ -116,7 +116,7 @@ public class NoRequestMappingAnnotationReconcilerTest extends BaseReconcilerTest
assertEquals("@RequestMapping(value = \"/1\", method = GET)", markedStr);
assertEquals(3, problem.getQuickfixes().size());
assertEquals("Replace with '@GetMapping'", problems.get(0).getQuickfixes().get(0).title);
assertEquals("Replace with `@GetMapping`", problems.get(0).getQuickfixes().get(0).title);
}
@@ -151,7 +151,7 @@ public class NoRequestMappingAnnotationReconcilerTest extends BaseReconcilerTest
assertEquals("@RequestMapping(value = \"/1\", method = { RequestMethod.GET })", markedStr);
assertEquals(3, problem.getQuickfixes().size());
assertEquals("Replace with '@GetMapping'", problems.get(0).getQuickfixes().get(0).title);
assertEquals("Replace with `@GetMapping`", problems.get(0).getQuickfixes().get(0).title);
}
@@ -231,11 +231,11 @@ public class NoRequestMappingAnnotationReconcilerTest extends BaseReconcilerTest
assertEquals(1, problems.size());
assertEquals(5, problems.get(0).getQuickfixes().size());
assertEquals("Replace with '@GetMapping'", problems.get(0).getQuickfixes().get(0).title);
assertEquals("Replace with '@PostMapping'", problems.get(0).getQuickfixes().get(1).title);
assertEquals("Replace with '@PutMapping'", problems.get(0).getQuickfixes().get(2).title);
assertEquals("Replace with '@DeleteMapping'", problems.get(0).getQuickfixes().get(3).title);
assertEquals("Replace with '@PatchMapping'", problems.get(0).getQuickfixes().get(4).title);
assertEquals("Replace with `@GetMapping`", problems.get(0).getQuickfixes().get(0).title);
assertEquals("Replace with `@PostMapping`", problems.get(0).getQuickfixes().get(1).title);
assertEquals("Replace with `@PutMapping`", problems.get(0).getQuickfixes().get(2).title);
assertEquals("Replace with `@DeleteMapping`", problems.get(0).getQuickfixes().get(3).title);
assertEquals("Replace with `@PatchMapping`", problems.get(0).getQuickfixes().get(4).title);
}
@Test