@Test public void testToDocumentation() throws Exception { final File fileA = mock(File.class); final Documentation docA = mock(Documentation.class); when(docA.getObjectName()).thenReturn("2"); whenNew(Documentation.class).withArguments(fileA).thenReturn(docA); final File fileB = mock(File.class); final Documentation docB = mock(Documentation.class); when(docB.getObjectName()).thenReturn("1"); whenNew(Documentation.class).withArguments(fileB).thenReturn(docB); assertThat(mojo.toDocumentation(Arrays.asList(fileA, fileB))).containsExactly(docB, docA); }
List<Documentation> toDocumentation(final List<File> files) { final List<Documentation> documentation = new ArrayList<Documentation>(files.size()); for (final File file : files) { documentation.add(new Documentation(file)); } Collections.sort(documentation, new DocumentationNameComparator()); return documentation; }
CDocReportMojo extends AbstractMavenReport { List<Documentation> toDocumentation(final List<File> files) { final List<Documentation> documentation = new ArrayList<Documentation>(files.size()); for (final File file : files) { documentation.add(new Documentation(file)); } Collections.sort(documentation, new DocumentationNameComparator()); return documentation; } }
CDocReportMojo extends AbstractMavenReport { List<Documentation> toDocumentation(final List<File> files) { final List<Documentation> documentation = new ArrayList<Documentation>(files.size()); for (final File file : files) { documentation.add(new Documentation(file)); } Collections.sort(documentation, new DocumentationNameComparator()); return documentation; } CDocReportMojo();  CDocReportMojo(final TextParser textParser, final ScriptExecutionDetailsParser detailsParser); }
CDocReportMojo extends AbstractMavenReport { List<Documentation> toDocumentation(final List<File> files) { final List<Documentation> documentation = new ArrayList<Documentation>(files.size()); for (final File file : files) { documentation.add(new Documentation(file)); } Collections.sort(documentation, new DocumentationNameComparator()); return documentation; } CDocReportMojo();  CDocReportMojo(final TextParser textParser, final ScriptExecutionDetailsParser detailsParser); @Override boolean canGenerateReport(); @Override String getDescription(final Locale locale); @Override String getName(final Locale locale); @Override String getOutputName(); @Override boolean isExternalReport(); }
CDocReportMojo extends AbstractMavenReport { List<Documentation> toDocumentation(final List<File> files) { final List<Documentation> documentation = new ArrayList<Documentation>(files.size()); for (final File file : files) { documentation.add(new Documentation(file)); } Collections.sort(documentation, new DocumentationNameComparator()); return documentation; } CDocReportMojo();  CDocReportMojo(final TextParser textParser, final ScriptExecutionDetailsParser detailsParser); @Override boolean canGenerateReport(); @Override String getDescription(final Locale locale); @Override String getName(final Locale locale); @Override String getOutputName(); @Override boolean isExternalReport();  }