コード例 #1
0
 public void TestAddSubVal()
 {
     var test = new Header();
     test.AddSubVal("foo", new List<string>{"bar", "raz"});
     var result = test.AsJson();
     Assert.AreEqual("{\"sub\" : {\"foo\" : [\"bar\", \"raz\"]}}", result);
 }
コード例 #2
0
 public void TestAddHeader()
 {
     var test = new Header();
     test.AddSubVal("foo", new List<string> { "a", "b" });
     var mime = new MailMessage();
     test.AddHeader(mime);
     var result = mime.Headers.Get("x-smtpapi");
     Assert.AreEqual("{\"sub\" : {\"foo\" : [\"a\", \"b\"]}}", result);
 }
コード例 #3
0
 public void AddSubVal(String replacementTag, List <String> substitutionValues)
 {
     //let the system complain if they do something bad, since the function returns null
     Header.AddSubVal(replacementTag, substitutionValues);
 }