public void SparqlParsingCore427_2() { const String query = "SELECT (StrUUID() AS ?test) { }"; SparqlQuery q = this._parser.ParseFromString(query); String toString = q.ToString(); Assert.IsTrue(toString.Contains("(STRUUID")); String formattedString = new SparqlFormatter().Format(q); Assert.IsTrue(formattedString.Contains("(STRUUID")); }
public void SparqlGroupByRefactor7() { String query = "SELECT ?s WHERE { ?s ?p ?o } GROUP BY (?s)"; SparqlQueryParser parser = new SparqlQueryParser(); SparqlQuery q = parser.ParseFromString(query); String queryStr = q.ToString(); Console.WriteLine("Raw ToString()"); Console.WriteLine(queryStr); Console.WriteLine(); Assert.IsTrue(queryStr.Contains("GROUP BY ?s")); String queryStrFmt = new SparqlFormatter().Format(q); Console.WriteLine("Formatted String"); Console.WriteLine(queryStrFmt); Assert.IsTrue(queryStrFmt.Contains("GROUP BY ?s")); }