New test.
[mono.git] / mcs / class / System / Test / System.Security.Cryptography.X509Certificates / X509ChainTest.cs
1 //
2 // X509ChainTest.cs - NUnit tests for X509Chain
3 //
4 // Author:
5 //      Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
9
10 #if NET_2_0
11
12 using NUnit.Framework;
13
14 using System;
15 using System.Security.Cryptography.X509Certificates;
16
17 namespace MonoTests.System.Security.Cryptography.X509Certificates {
18
19         [TestFixture]
20         public class X509ChainTest : Assertion {
21
22                 [Test]
23                 public void ConstructorEmpty () 
24                 {
25                         X509Chain c = new X509Chain ();
26                         // default properties
27                         AssertEquals ("ChainElements", 0, c.ChainElements.Count);
28                         AssertNotNull ("ChainPolicy", c.ChainPolicy);
29                         AssertEquals ("ChainStatus", 0, c.ChainStatus.Length);
30                 }
31
32                 [Test]
33                 public void ConstructorMachineContextFalse () 
34                 {
35                         X509Chain c = new X509Chain (false);
36                         // default properties
37                         AssertEquals ("ChainElements", 0, c.ChainElements.Count);
38                         AssertNotNull ("ChainPolicy", c.ChainPolicy);
39                         AssertEquals ("ChainStatus", 0, c.ChainStatus.Length);
40                 }
41
42                 [Test]
43                 public void ConstructorMachineContextTrue () 
44                 {
45                         X509Chain c = new X509Chain (true);
46                         // default properties
47                         AssertEquals ("ChainElements", 0, c.ChainElements.Count);
48                         AssertNotNull ("ChainPolicy", c.ChainPolicy);
49                         AssertEquals ("ChainStatus", 0, c.ChainStatus.Length);
50                 }
51
52                 [Test]
53                 public void StaticCreation () 
54                 {
55                         X509Chain c = X509Chain.Create ();
56                         // default properties
57                         AssertEquals ("ChainElements", 0, c.ChainElements.Count);
58                         AssertNotNull ("ChainPolicy", c.ChainPolicy);
59                         AssertEquals ("ChainStatus", 0, c.ChainStatus.Length);
60                 }
61         }
62 }
63
64 #endif