You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Claude Warren (JIRA)" <ji...@apache.org> on 2015/08/10 17:10:46 UTC
[jira] [Updated] (JENA-975) Improve the quality of
jena-querybuilder's tests
[ https://issues.apache.org/jira/browse/JENA-975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Warren updated JENA-975:
-------------------------------
Assignee: Claude Warren
Component/s: (was: Jena)
QueryBuilder
The problem is in the way jena-querybuilder does testing. It does a regex on the rturn from
builder.buildString()}] which in term is {{builder.build().toString().
Testing whether a query is the expected one by using string matching is fragile. Much better
is to call Query.equals – write the expected query, parse it to a Query object and
call Query::equals.
The reason jena-querybuilder is now failing tests is JENA-972 which improves the string appear
of queries.
> Improve the quality of jena-querybuilder's tests
> ------------------------------------------------
>
> Key: JENA-975
> URL: https://issues.apache.org/jira/browse/JENA-975
> Project: Apache Jena
> Issue Type: Task
> Components: QueryBuilder
> Affects Versions: Jena 3.0.0
> Reporter: A. Soroka
> Assignee: Claude Warren
> Priority: Minor
>
> Currently, {{jena-querybuilder}} tests whether a query is the expected one by using string matching. This is fragile and breaks when the string representation of a {{Query}} changes. It would be much better to use {{Query::equals}}, by parsing the correct expected query to a {{Query}} object and comparing it to the constructed sample.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)