Esempio n. 1
0
 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));
 }
Esempio n. 2
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"));
 }
Esempio n. 3
0
 public void TestGraphListModelSupportsSparqlJsonFormat()
 {
     var m = new GraphListModel(TestGraphs);
     var resultsString = m.AsString(SparqlResultsFormat.Json);
     // TODO: Validate result content
 }
Esempio n. 4
0
 public void TestGraphListModelSupportsSparqlXmlFormat()
 {
     var m = new GraphListModel(TestGraphs);
     var resultsString = m.AsString(SparqlResultsFormat.Xml);
     ValidateXmlResults(resultsString, TestGraphs);
 }