PT #153051451 Symbol for RequestMapping without parameters
This commit is contained in:
@@ -59,6 +59,18 @@ public class RequestMappingSymbolProviderTest {
|
||||
assertTrue(containsSymbol(symbols, "@/parent/greeting -- GET", uriPrefix + "/src/main/java/org/test/ParentMappingClass.java", 8, 1, 8, 47));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEmptyPathWithParentRequestMappingSymbol() throws Exception {
|
||||
harness.intialize(new File(ProjectsHarness.class.getResource("/test-projects/test-request-mapping-symbols/").toURI()));
|
||||
|
||||
File directory = new File(ProjectsHarness.class.getResource("/test-projects/test-request-mapping-symbols/").toURI());
|
||||
|
||||
String uriPrefix = "file://" + directory.getAbsolutePath();
|
||||
List<? extends SymbolInformation> symbols = harness.getServer().getSpringIndexer().getSymbols(uriPrefix + "/src/main/java/org/test/ParentMappingClass2.java");
|
||||
assertEquals(1, symbols.size());
|
||||
assertTrue(containsSymbol(symbols, "@/parent2 -- GET,POST,DELETE", uriPrefix + "/src/main/java/org/test/ParentMappingClass2.java", 8, 1, 8, 16));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultiRequestMappingSymbol() throws Exception {
|
||||
harness.intialize(new File(ProjectsHarness.class.getResource("/test-projects/test-request-mapping-symbols/").toURI()));
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.test;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod.*;
|
||||
|
||||
@RequestMapping(value="parent2", method= {GET,POST,DELETE})
|
||||
public class ParentMappingClass2 {
|
||||
|
||||
@RequestMapping
|
||||
public void nothing() {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user