Exemple #1
0
 public void op_FromString_string_whenEmptyName()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => HttpParameter.FromString("=value"));
 }
Exemple #2
0
 public void op_FromString_string_whenTwoEquals()
 {
     Assert.Throws <FormatException>(() => HttpParameter.FromString("name=value=example"));
 }
Exemple #3
0
 public void op_FromString_stringNull()
 {
     Assert.Throws <ArgumentNullException>(() => HttpParameter.FromString(null));
 }
Exemple #4
0
 public void op_FromString_stringEmpty(string value)
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => HttpParameter.FromString(value));
 }
Exemple #5
0
 public void op_FromString_string_withoutEquals()
 {
     Assert.Throws <FormatException>(() => HttpParameter.FromString("example"));
 }
Exemple #6
0
 public void op_FromString_string_withSemicolon()
 {
     Assert.Throws <FormatException>(() => HttpParameter.FromString(";example"));
 }
        public void op_ToString()
        {
            var obj = new HttpParameter("name", "value");
            const string expected = "name=value";
            var actual = obj.ToString();

            Assert.Equal(expected, actual);
        }