[ 
https://issues.apache.org/jira/browse/JENA-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13707075#comment-13707075
 ] 

Rob Vesse commented on JENA-488:
--------------------------------

TestReaders is in jena-core so ARQ should not be loaded, you can't just fix the 
test by allowing either because jena-core tests should have no dependency on 
ARQ.

I assume the scenario that is affecting you is that you are trying to test a 
custom model implementation in a context where you do have ARQ loaded?

If this is the case then I suggest maybe the appropriate refactor is to extract 
an abstract superclass from TestReaders with an abstract protected method that 
returns the Class for the expected reader for the format in the given context.  
Then in jena-core TestReaders just extends this new abstract class and 
implements that method returning NTripleReader.class

In your tests you can extend the abstract superclass and return 
RDFReaderRIOT.class instead.
                
> TestReaders.testGetNTripleReader() is dependent upon ARQ not being loaded.
> --------------------------------------------------------------------------
>
>                 Key: JENA-488
>                 URL: https://issues.apache.org/jira/browse/JENA-488
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena, RIOT
>    Affects Versions: Jena 2.10.1
>            Reporter: Claude Warren
>            Assignee: Claude Warren
>              Labels: easyfix
>
> The testGetNTripleReader test assumes that the NTriple reader will be an 
> instance of NTripleReader, which is correct if ARQ has not been loaded.  When 
> ARQ has been loaded the result is an instance of RDFReaderRIOT.  
> This bug is to fix the test to accept RDFReaderRIOT or NTripleReader as valid 
> results.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to