Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] #773 fixed by checking not null insted of null

Hi Heshan,

Attempting to parse an empty document isn't going to test whether the handler is allowed to be null, which is the key feature of the issue you are trying to solve. You need to delete those tests and create new tests where the handler is null and it is testing successfully being able to parse a non-empty valid document.

Cheers,

Peter

On 23 March 2017 at 15:29, Heshan Jayasinghe <shanujse@xxxxxxxxx> wrote:
Hi Jeen,

New two Test hits following Test classes


​I implement that test to pass only RDFJSONHandlingTest that is the reason I used RDFParseException.Error in expected class.it is not wrok with other test classes

@Test(expected = RDFParseException.class)
public void testNullRdfHandlerReader() throws IOException {

getParser().parse(new InputStreamReader(new ByteArrayInputStream("".getBytes())) , "");

}
So I add try catch to handle IOException like this 

@Test
public void testNullRdfHandlerReader(){
try {
getParser().parse(new InputStreamReader(new ByteArrayInputStream("".getBytes())), "");
}catch (IOException e){
e.printStackTrace();
}
}
This one also not work.can you please tell me what is correct way to handle this IOException with out disturbing other Test classes.
Thank you!
regards,
Heshan

_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/rdf4j-dev



Back to the top