Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JAX-RS code lens test failures #761

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private static void assertCodeLenses(int port, String rootPath, MicroProfileJava
IJDTUtils utils) throws JavaModelException {
List<? extends CodeLens> lenses = PropertiesManagerForJava.getInstance().codeLens(params, utils,
new NullProgressMonitor());
Assert.assertEquals(2, lenses.size());
Assert.assertEquals(5, lenses.size());

// @GET
// public Fruit[] get() {
Expand All @@ -156,6 +156,33 @@ private static void assertCodeLenses(int port, String rootPath, MicroProfileJava
Assert.assertNotNull(lensForGetSingle.getCommand());
Assert.assertEquals("http://localhost:" + port + rootPath + "/fruits/{id}",
lensForGetSingle.getCommand().getTitle());

// @POST
// @Transactional
// public Response create(Fruit fruit) {
CodeLens lensForPost = lenses.get(2);
Assert.assertNotNull(lensForPost.getCommand());
Assert.assertEquals("", lensForPost.getCommand().getCommand());
Assert.assertEquals("http://localhost:" + port + rootPath + "/fruits", lensForPost.getCommand().getTitle());

// @PUT
// @Path("{id}")
// @Transactional
// public Fruit update(@PathParam Integer id, Fruit fruit) {
CodeLens lensForPut = lenses.get(3);
Assert.assertNotNull(lensForPut.getCommand());
Assert.assertEquals("", lensForPut.getCommand().getCommand());
Assert.assertEquals("http://localhost:" + port + rootPath + "/fruits/{id}", lensForPut.getCommand().getTitle());

// @DELETE
// @Path("{id}")
// @Transactional
// public Response delete(@PathParam Integer id) {
CodeLens lensForDelete = lenses.get(4);
Assert.assertNotNull(lensForDelete.getCommand());
Assert.assertEquals("", lensForDelete.getCommand().getCommand());
Assert.assertEquals("http://localhost:" + port + rootPath + "/fruits/{id}",
lensForDelete.getCommand().getTitle());
}

}