2 // AlternateViewTest.cs - NUnit Test Cases for System.Net.MailAddress.AlternateView
5 // John Luke (john.luke@gmail.com)
10 using NUnit.Framework;
13 using System.Net.Mail;
14 using System.Net.Mime;
16 namespace MonoTests.System.Net.Mail
19 public class AlternateViewTest
24 public void GetReady ()
26 av = AlternateView.CreateAlternateViewFromString ("test", new ContentType ("text/plain"));
30 [ExpectedException (typeof (ArgumentNullException))]
31 public void ArgumentNullException ()
34 new AlternateView (s);
38 [ExpectedException (typeof (ArgumentNullException))]
39 public void ArgumentNullException2 ()
42 new AlternateView (s);
46 public void ContentType ()
48 Assert.IsNotNull (av.ContentType);
49 Assert.IsTrue (av.ContentType.MediaType == "text/plain");
53 public void ContentStream ()
55 Assert.IsNotNull (av.ContentStream);
56 Assert.IsTrue (av.ContentStream.Length == 4);
60 public void TransferEncoding ()
62 //Assert.IsTrue (av.TransferEncoding = TransferEncoding.QuotedPrintable);