/** * A test which verifies that an exception is NOT thrown if * the named solution set does not exist and SILENT is specified. */ public void test_clearSolutionSet_02() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } con.prepareUpdate(QueryLanguage.SPARQL, "clear silent solutions %namedSet1").execute(); }
/** * A test which verifies that an exception is NOT thrown if * the named solution set does not exist and SILENT is specified. */ public void test_dropSolutionSet_02() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } con.prepareUpdate(QueryLanguage.SPARQL, "drop silent solutions %namedSet1").execute(); }
/** * A correct rejection test which verifies that an exception is thrown if * the named solution set does not exist. */ public void test_dropSolutionSet_01() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } try { con.prepareUpdate(QueryLanguage.SPARQL, "drop solutions %namedSet1") .execute(); fail("Excepting: " + UpdateExecutionException.class); } catch(UpdateExecutionException ex) { if(log.isInfoEnabled()) log.info("Ignoring expected exception: "+ex); } }
/** * A correct rejection test which verifies that an exception is thrown if * the named solution set does not exist. */ public void test_clearSolutionSet_01() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } try { con.prepareUpdate(QueryLanguage.SPARQL, "clear solutions %namedSet1") .execute(); fail("Excepting: " + UpdateExecutionException.class); } catch(UpdateExecutionException ex) { if(log.isInfoEnabled()) log.info("Ignoring expected exception: "+ex); } }
/** * A test which verifies that an exception is NOT thrown if * the named solution set does not exist and SILENT is specified. */ public void test_clearSolutionSet_02() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } con.prepareUpdate(QueryLanguage.SPARQL, "clear silent solutions %namedSet1").execute(); }
/** * A test which verifies that an exception is NOT thrown if * the named solution set does not exist and SILENT is specified. */ public void test_dropSolutionSet_02() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } con.prepareUpdate(QueryLanguage.SPARQL, "drop silent solutions %namedSet1").execute(); }
/** * Unit test of CREATE SILENT SOLUTIONS verifies that an error is reported * if SILENT is not specified and the solution set exists and that the error * is suppressed if the SILENT keyword is given. */ public void test_createSolutionSet_02() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } // Should succeed. con.prepareUpdate(QueryLanguage.SPARQL, "create solutions %namedSet1") .execute(); // Should fail. try { con.prepareUpdate(QueryLanguage.SPARQL, "create solutions %namedSet1").execute(); fail("Excepting: " + UpdateExecutionException.class); } catch (UpdateExecutionException ex) { if (log.isInfoEnabled()) log.info("Ignoring expected exception: " + ex); } // Should succeed since SILENT. con.prepareUpdate(QueryLanguage.SPARQL, "create silent solutions %namedSet1").execute(); }
RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) {
/** * A correct rejection test which verifies that an exception is thrown if * the named solution set does not exist. */ public void test_dropSolutionSet_01() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } try { con.prepareUpdate(QueryLanguage.SPARQL, "drop solutions %namedSet1") .execute(); fail("Excepting: " + UpdateExecutionException.class); } catch(UpdateExecutionException ex) { if(log.isInfoEnabled()) log.info("Ignoring expected exception: "+ex); } }
/** * A correct rejection test which verifies that an exception is thrown if * the named solution set does not exist. */ public void test_clearSolutionSet_01() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } try { con.prepareUpdate(QueryLanguage.SPARQL, "clear solutions %namedSet1") .execute(); fail("Excepting: " + UpdateExecutionException.class); } catch(UpdateExecutionException ex) { if(log.isInfoEnabled()) log.info("Ignoring expected exception: "+ex); } }
/** * Unit test of CREATE SILENT SOLUTIONS verifies that an error is reported * if SILENT is not specified and the solution set exists and that the error * is suppressed if the SILENT keyword is given. */ public void test_createSolutionSet_02() throws UpdateExecutionException, RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) { /* * Test requires this feature. */ return; } // Should succeed. con.prepareUpdate(QueryLanguage.SPARQL, "create solutions %namedSet1") .execute(); // Should fail. try { con.prepareUpdate(QueryLanguage.SPARQL, "create solutions %namedSet1").execute(); fail("Excepting: " + UpdateExecutionException.class); } catch (UpdateExecutionException ex) { if (log.isInfoEnabled()) log.info("Ignoring expected exception: " + ex); } // Should succeed since SILENT. con.prepareUpdate(QueryLanguage.SPARQL, "create silent solutions %namedSet1").execute(); }
RepositoryException, MalformedQueryException { if (!isSolutionSetUpdateEnabled()) {