* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System / Test / System.Net.Mail / AlternateViewCollectionTest.cs
1 //
2 // AlternateViewCollectionTest.cs - NUnit Test Cases for System.Net.MailAddress.AlternateViewCollection
3 //
4 // Authors:
5 //   John Luke (john.luke@gmail.com)
6 //
7 // (C) 2005 John Luke
8 //
9 #if NET_2_0
10 using NUnit.Framework;
11 using System;
12 using System.IO;
13 using System.Net.Mail;
14 using System.Net.Mime;
15
16 namespace MonoTests.System.Net.Mail
17 {
18         [TestFixture]
19         public class AlternateViewCollectionTest
20         {
21                 AlternateViewCollection avc;
22                 AlternateView av;
23                 
24                 [SetUp]
25                 public void GetReady ()
26                 {
27                         avc = new  MailMessage ("foo@bar.com", "foo@bar.com").AlternateViews;
28                         av = AlternateView.CreateAlternateViewFromString ("test", new ContentType ("text/plain"));
29                 }
30
31                 [Test]
32                 public void InitialCount ()
33                 {
34                         Assert.IsTrue (avc.Count == 0);
35                 }
36
37                 [Test]
38                 public void AddCount ()
39                 {
40                         avc.Add (av);
41                         Assert.IsTrue (avc.Count == 1);
42                 }
43
44                 [Test]
45                 public void RemoveCount ()
46                 {
47                         avc.Remove (av);
48                         Assert.IsTrue (avc.Count == 0);
49                 }
50         }
51 }
52 #endif