Closed cxcorp closed 7 years ago
SubmissionResultParserTest
@Test
public void parsesTestResultsWithFailedCheckstyle() throws IOException {
String json = TestUtils.readJsonFile(this.getClass(), "checkstyleFailed.json");
SubmissionResult result = parser.parseFromJson(json);
assertThat(result.getValidations().getValidationErrors().size() > 0);
}
:+1:
Currently, responses with validation error information cause an exception in
SubmissionResultParser
during deserialization (see #109). This happens becauseValidationResultImpl
stores them in aMap<File, List<ValidationError>>
, but the Gson JSON parser cannot resolve JSON strings intoFile
instances. This is fixed by 3809cf8.Fixing this bug reveals another one: the validation errors cannot be deserialized into
ValidationError
instances becauseValidationError
is an abstract class. This is fixed by 7a94b20.