public void test_RDFAnnotation_testMissingAbout()
{
string withAbout = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
" <annotation>\n" +
" <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n" +
" <rdf:Description rdf:about=\"#_000004\">\n" +
" <bqbiol:is>\n" +
" <rdf:Bag>\n" +
" <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n" +
" </rdf:Bag>\n" +
" </bqbiol:is>\n" +
" </rdf:Description>\n" +
" </rdf:RDF>\n" +
" </annotation>";
string emptyAbout = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
" <annotation>\n" +
" <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n" +
" <rdf:Description rdf:about=\"\">\n" +
" <bqbiol:is>\n" +
" <rdf:Bag>\n" +
" <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n" +
" </rdf:Bag>\n" +
" </bqbiol:is>\n" +
" </rdf:Description>\n" +
" </rdf:RDF>\n" +
" </annotation>";
string noAbout = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
" <annotation>\n" +
" <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n" +
" <rdf:Description>\n" +
" <bqbiol:is>\n" +
" <rdf:Bag>\n" +
" <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n" +
" </rdf:Bag>\n" +
" </bqbiol:is>\n" +
" </rdf:Description>\n" +
" </rdf:RDF>\n" +
" </annotation>";
CVTermList cvTerms = new CVTermList();
XMLInputStream stream = new XMLInputStream ( withAbout,false );
XMLNode node = new XMLNode ( stream );
RDFAnnotationParser.parseRDFAnnotation(node,cvTerms);
assertTrue( cvTerms.getSize() == 1 );
cvTerms = new CVTermList();
RDFAnnotationParser.parseRDFAnnotation(node,cvTerms );
assertTrue( cvTerms.getSize() == 1 );
cvTerms = null;
cvTerms = null;
cvTerms = new CVTermList();
XMLInputStream stream1 = new XMLInputStream ( emptyAbout,false );
XMLNode node1 = new XMLNode ( stream1 );
RDFAnnotationParser.parseRDFAnnotation(node1,cvTerms);
assertTrue( cvTerms.getSize() == 0 );
cvTerms = null;
cvTerms = null;
cvTerms = new CVTermList();
XMLInputStream stream2 = new XMLInputStream ( noAbout,false );
XMLNode node2 = new XMLNode ( stream2 );
RDFAnnotationParser.parseRDFAnnotation(node2,cvTerms);
assertTrue( cvTerms.getSize() == 0 );
cvTerms = null;
cvTerms = null;
}