@Test public void test_findComponents_TruncatesComponentDescriptions_WhenComponentDescriptionsAreTooLong() throws Exception { ComponentFinder componentFinder = new ComponentFinder( webApplication, "test.SourceCodeComponentFinderStrategy", new SourceCodeComponentFinderStrategy(sourcePath, 10) ); componentFinder.findComponents(); assertEquals("A compo...", someComponent.getDescription()); }
@Override public void afterFindComponents() throws Exception { runJavaDoc();
@Test public void test_findComponents_DoesNotSetTheComponentDescription_WhenTheComponentAlreadyHasADescription() throws Exception { someComponent.setDescription("An existing description."); ComponentFinder componentFinder = new ComponentFinder( webApplication, "test.SourceCodeComponentFinderStrategy", new SourceCodeComponentFinderStrategy(sourcePath, 10) ); componentFinder.findComponents(); assertEquals("An existing description.", someComponent.getDescription()); }
@Test public void test_findComponents() throws Exception { ComponentFinder componentFinder = new ComponentFinder( webApplication, "test.SourceCodeComponentFinderStrategy", new SourceCodeComponentFinderStrategy(sourcePath) ); componentFinder.findComponents(); assertEquals("A component that does something.", someComponent.getDescription()); assertEquals(20, someComponent.getSize()); }
"org.springframework.samples.petclinic", springComponentFinderStrategy, new SourceCodeComponentFinderStrategy(new File(sourceRoot, "/src/main/java/"), 150));
new ReferencedTypesSupportingTypesStrategy(false) ), new SourceCodeComponentFinderStrategy(new File(sourceRoot, "/src/main/java/"), 150)); componentFinder.findComponents();