More logging on unit test failure

This commit is contained in:
aboyko
2025-02-28 11:52:27 -05:00
parent b0d42d1410
commit 9ccbc328ee

View File

@@ -165,13 +165,7 @@ public class XMLBeansHyperlinkTest {
// @Disabled
void testBeanRefHyperlink() throws Exception {
Bean[] allBeans = springIndex.getBeans();
log.info("------------------ testBeanRefHyperlink - all the beans ----------------------");
for (Bean bean : allBeans) {
log.info("bean: " + bean.getName() + " - " + bean.getLocation().getUri());
}
log.info("------------------ testBeanRefHyperlink - end of all the beans ----------------------");
assertEquals(4, springIndex.getBeans().length);
assertEquals(4, springIndex.getBeans().length, "All beans are: %s".formatted(Arrays.stream(allBeans).map(b -> "(name=%s, type=%s)".formatted(b.getName(), b.getType())).collect(Collectors.joining(", "))));
Bean[] beans = springIndex.getBeansWithName(project.getElementName(), "simpleObj");
assertEquals(1, beans.length, "Found beans are: %s".formatted(Arrays.stream(beans).map(b -> "(name=%s, type=%s)".formatted(b.getName(), b.getType())).collect(Collectors.joining(", "))));