@Test(dataProvider="provideBadSamples") public void shouldGiveError_withLineNumberInformation_whenParsingIncorrectSuite(String filePath, int expectedLine, String expectedMessage) throws IOException {
FileSyntaxException exception = null;
try {
new GalenSuiteReader().read(new File(getClass().getResource(filePath).getFile()));
}
catch (FileSyntaxException e) {
exception = e;
System.out.println("***************");
e.printStackTrace();
}
String fullPath = getClass().getResource(filePath).getFile();
assertThat("Exception should be thrown", exception, notNullValue());
assertThat("Message should be", exception.getMessage(), is(expectedMessage + "\n in " + fullPath + ":" + expectedLine));
assertThat("Line should be", exception.getLine(), is(expectedLine));
}