Example #1
0
 public void WriteSingle() {
     var parts = new Dictionary<string, string[]> { { "single", new[] { "only" } } };
     var query = new QueryString(parts);
     query.ToString()
          .ShouldEqual("single=only");
 }
Example #2
0
 public void WriteEscaped() {
     var parts = new Dictionary<string, string[]> { { "escaped", new[] { "c++ < c#" } } };
     var query = new QueryString(parts);
     query.ToString()
          .ShouldEqual("escaped=c%2B%2B%20%3C%20c%23");
 }
Example #3
0
 public void WriteMultiple() {
     var parts = new Dictionary<string, string[]> { { "single", new[] { "only" } }, { "multi", new[] { "first", "second" } } };
     var query = new QueryString(parts);
     query.ToString()
          .ShouldEqual("single=only&multi=first&multi=second");
 }
Example #4
0
 public void WriteEmpty() {
     var parts = new Dictionary<string, string[]>();
     var query = new QueryString(parts);
     query.ToString()
          .ShouldEqual(string.Empty);
 }