public void Only_Parse_If_Data_Chars_In_Constructor_Uri_Test()
        {
            var uri = new TrackedUriFormatter("http://localhost:3333/sdata/aw/dynamic/-/accounts?test=foo&hello=world");

            Assert.That(uri.QueryParsed, Is.False);
            uri = new TrackedUriFormatter("http://localhost:3333/sdata/aw/dynamic/-/accounts?test=foo:bar&hello=world");
            Assert.That(uri.QueryParsed, Is.True);
        }
        public void DirectPath_Retained_When_Uri_Auto_Escaped_Test()
        {
            var uri = new TrackedUriFormatter("http://localhost:3333/sdata/aw/dynamic/-/accounts('abc123')/address?test=foo:bar");

            Assert.That(uri.DirectPath, Is.EqualTo("sdata/aw/dynamic/-/accounts/address"));
        }
Ejemplo n.º 3
0
 public void DirectPath_Retained_When_Uri_Auto_Escaped_Test()
 {
     var uri = new TrackedUriFormatter("http://localhost:3333/sdata/aw/dynamic/-/accounts('abc123')/address?test=foo:bar");
     Assert.That(uri.DirectPath, Is.EqualTo("sdata/aw/dynamic/-/accounts/address"));
 }
Ejemplo n.º 4
0
 public void Only_Parse_If_Percent_Not_Escape_In_Constructor_Uri_Test()
 {
     var uri = new TrackedUriFormatter("http://localhost:3333/sdata/aw/dynamic/-/accounts?test=foo%30bar&hello=world");
     Assert.That(uri.QueryParsed, Is.False);
 }