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); }
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); }
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); }