public void IncompleteEscapeSequenceGetsEscaped(string input, string expected) { var formatter = new NTriplesFormatter(NTriplesSyntax.Rdf11); var formatOutput = formatter.FormatUri(new Uri(input)); formatOutput.Should().Be(expected); }
public void NonAsciiCharactersMustNotBeEscaped() { var formatter = new NTriplesFormatter(NTriplesSyntax.Rdf11); var formatOutput = formatter.FormatUri(new Uri("http://example.org/渋谷駅")); formatOutput.Should().Be("http://example.org/渋谷駅"); }
public void EscapeSequenceInOriginalStringMustNotBeDoubleEscaped() { var formatter = new NTriplesFormatter(NTriplesSyntax.Rdf11); var formatOutput = formatter.FormatUri(new Uri("http://example.org/September%2C 2020")); formatOutput.Should().Be("http://example.org/September%2C%202020"); }
public void EscapedSpacesInIrisMustNotBeDoubleEscaped2() { var formatter = new NTriplesFormatter(NTriplesSyntax.Rdf11); var formatOutput = formatter.FormatUri(new Uri("http://example.org/foo+bar")); formatOutput.Should().Be("http://example.org/foo+bar"); }
public void PercentCharactersArePreservedInUriFormatting() { var formatter = new NTriplesFormatter(NTriplesSyntax.Rdf11); var u = new Uri("http://a.example/%66oo-bar"); var formatOutput = formatter.FormatUri(u); formatOutput.Should().Be("http://a.example/%66oo-bar"); }