Skip to content

Commit 2a11dbf

Browse files
committed
adapt named annotation tests to improved component bean name implementation
1 parent 4e90e81 commit 2a11dbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/boot/java/beans/test/SpringIndexerJakartaJavaxAnnotationsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ void testNamedAnnotationJakarta() throws Exception {
8181
String docUri = directory.toPath().resolve("src/main/java/org/test/jakarta/NamedComponentWithSpecificName.java").toUri().toString();
8282

8383
SpringIndexerHarness.assertDocumentSymbols(indexer, docUri,
84-
SpringIndexerHarness.symbol("@Named(\"specificallyNamedComponent\")", "@+ 'namedComponentWithSpecificName' (@Named) NamedComponentWithSpecificName")
84+
SpringIndexerHarness.symbol("@Named(\"specificallyNamedComponent\")", "@+ 'specificallyNamedComponent' (@Named) NamedComponentWithSpecificName")
8585
);
8686

8787
Bean[] beans = springIndex.getBeansOfDocument(docUri);
8888
assertEquals(1, beans.length);
8989

90-
assertEquals("namedComponentWithSpecificName", beans[0].getName());
90+
assertEquals("specificallyNamedComponent", beans[0].getName());
9191
assertEquals("org.test.jakarta.NamedComponentWithSpecificName", beans[0].getType());
9292
}
9393

@@ -96,13 +96,13 @@ void testNamedAnnotationJavax() throws Exception {
9696
String docUri = directory.toPath().resolve("src/main/java/org/test/javax/NamedComponentWithSpecificName.java").toUri().toString();
9797

9898
SpringIndexerHarness.assertDocumentSymbols(indexer, docUri,
99-
SpringIndexerHarness.symbol("@Named(\"specificallyNamedComponent\")", "@+ 'namedComponentWithSpecificName' (@Named) NamedComponentWithSpecificName")
99+
SpringIndexerHarness.symbol("@Named(\"specificallyNamedComponent\")", "@+ 'specificallyNamedComponent' (@Named) NamedComponentWithSpecificName")
100100
);
101101

102102
Bean[] beans = springIndex.getBeansOfDocument(docUri);
103103
assertEquals(1, beans.length);
104104

105-
assertEquals("namedComponentWithSpecificName", beans[0].getName());
105+
assertEquals("specificallyNamedComponent", beans[0].getName());
106106
assertEquals("org.test.javax.NamedComponentWithSpecificName", beans[0].getType());
107107
}
108108

0 commit comments

Comments
 (0)