@Test(expected = SampleParsingException.class) public void sampleBadEndTag() throws Exception { File sampleFile = getSampleFile("BadEndTagSample.java"); SamplesParser.getSamples(sampleFile); }
public static List<CodeSample> getSamples(final File[] files, final String targetExtension) throws Exception { if (files == null) { throw new SampleParsingException( "Must provide a non-null set of files to parse"); } List<CodeSample> samples = new ArrayList<CodeSample>(); parseFiles(files, targetExtension, samples); return samples; }
SamplesParser { public static List<CodeSample> getSamples(final File[] files, final String targetExtension) throws Exception { if (files == null) { throw new SampleParsingException( "Must provide a non-null set of files to parse"); } List<CodeSample> samples = new ArrayList<CodeSample>(); parseFiles(files, targetExtension, samples); return samples; } }
SamplesParser { public static List<CodeSample> getSamples(final File[] files, final String targetExtension) throws Exception { if (files == null) { throw new SampleParsingException( "Must provide a non-null set of files to parse"); } List<CodeSample> samples = new ArrayList<CodeSample>(); parseFiles(files, targetExtension, samples); return samples; }  }
SamplesParser { public static List<CodeSample> getSamples(final File[] files, final String targetExtension) throws Exception { if (files == null) { throw new SampleParsingException( "Must provide a non-null set of files to parse"); } List<CodeSample> samples = new ArrayList<CodeSample>(); parseFiles(files, targetExtension, samples); return samples; }  static List<CodeSample> getSamples(final File[] files,
            final String targetExtension); static List<CodeSample> getSamples(final File file); }
SamplesParser { public static List<CodeSample> getSamples(final File[] files, final String targetExtension) throws Exception { if (files == null) { throw new SampleParsingException( "Must provide a non-null set of files to parse"); } List<CodeSample> samples = new ArrayList<CodeSample>(); parseFiles(files, targetExtension, samples); return samples; }  static List<CodeSample> getSamples(final File[] files,
            final String targetExtension); static List<CodeSample> getSamples(final File file);  }