public virtual void TestWriteStatementWithLiteralOfTypeBoolean() { TurtleWriter instance = CreateInstance(); instance.Add(new Statement("A", "b", Literal.FromValue(true))); instance.Close(); string expected = "<A> <b> true."; Assert.AreEqual(expected, writer.ToString()); }
public void TestWriteStatementWithLiteralHavingDataType() { NTriplesWriter instance = new NTriplesWriter(writer); instance.Add(new Statement("A", "b", Literal.FromValue("C"))); instance.Close(); string expected = "<A> <b> \"C\"^^<http://www.w3.org/2001/XMLSchema#string>.\n"; Assert.AreEqual(expected, writer.ToString()); }
public virtual void TestWriteStatementWithLiteralHavingDataTypeUsingNamespace() { TurtleWriter instance = CreateInstance(); instance.Namespaces.AddNamespace("http://www.w3.org/2001/XMLSchema#", "xsd"); instance.Add(new Statement("A", "b", Literal.FromValue("C"))); instance.Close(); string expected = "@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n<A> <b> \"C\"^^xsd:string."; Assert.AreEqual(expected, writer.ToString()); }