public void TestGraphListModelSupportsAnEmptyList() { var m = new GraphListModel(new String[]{}); var resultString = m.AsString(SparqlResultsFormat.Xml); var xmlDoc = XDocument.Parse(resultString); Assert.That(xmlDoc.SparqlResultRows().Count(), Is.EqualTo(0)); }
public void TestGraphListModelSupportsSparqlTsvFormat() { var m = new GraphListModel(TestGraphs); var resultsString = m.AsString(SparqlResultsFormat.Tsv); var lines = resultsString.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); Assert.That(lines.Count(), Is.EqualTo(TestGraphs.Count + 1)); Assert.That(lines[0].TrimEnd(), Is.EqualTo("?graphUri")); }
public void TestGraphListModelSupportsSparqlJsonFormat() { var m = new GraphListModel(TestGraphs); var resultsString = m.AsString(SparqlResultsFormat.Json); // TODO: Validate result content }
public void TestGraphListModelSupportsSparqlXmlFormat() { var m = new GraphListModel(TestGraphs); var resultsString = m.AsString(SparqlResultsFormat.Xml); ValidateXmlResults(resultsString, TestGraphs); }