[TEST] enable testUnknownObjectException for alternate query versions too
This commit is contained in:
parent
2c44278ce8
commit
8391e6de37
|
@ -317,8 +317,15 @@ public abstract class AbstractQueryTestCase<QB extends AbstractQueryBuilder<QB>>
|
||||||
* declared by overriding {@link #getObjectsHoldingArbitraryContent()}
|
* declared by overriding {@link #getObjectsHoldingArbitraryContent()}
|
||||||
*/
|
*/
|
||||||
public final void testUnknownObjectException() throws IOException {
|
public final void testUnknownObjectException() throws IOException {
|
||||||
//TODO building json by concatenating strings makes the code unmaintainable, we should rewrite this test
|
|
||||||
String validQuery = createTestQueryBuilder().toString();
|
String validQuery = createTestQueryBuilder().toString();
|
||||||
|
unknownObjectExceptionTest(validQuery);
|
||||||
|
for (String query : getAlternateVersions().keySet()) {
|
||||||
|
unknownObjectExceptionTest(query);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void unknownObjectExceptionTest(String validQuery) throws IOException {
|
||||||
|
//TODO building json by concatenating strings makes the code unmaintainable, we should rewrite this test
|
||||||
assertThat(validQuery, containsString("{"));
|
assertThat(validQuery, containsString("{"));
|
||||||
int level = 0;
|
int level = 0;
|
||||||
boolean withinQuotes = false;
|
boolean withinQuotes = false;
|
||||||
|
|
Loading…
Reference in New Issue