Welcome to mirror list, hosted at ThFree Co, Russian Federation.

X509ChainTest.cs « System.Security.Cryptography.X509Certificates « Test « System.Security « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 953607bcf42dab65593473ac6bd96e3382fca7f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// X509ChainTest.cs - NUnit tests for X509Chain
//
// Author:
//	Sebastien Pouliot (spouliot@motus.com)
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
//

#if NET_2_0

using NUnit.Framework;

using System;
using System.Security.Cryptography.X509Certificates;

namespace MonoTests.System.Security.Cryptography.X509Certificates {

	[TestFixture]
	public class X509ChainTest : Assertion {

		[Test]
		public void ConstructorEmpty () 
		{
			X509Chain c = new X509Chain ();
			// default properties
			AssertEquals ("ChainElements", 0, c.ChainElements.Count);
			AssertNotNull ("ChainPolicy", c.ChainPolicy);
			AssertEquals ("ChainStatus", 0, c.ChainStatus.Length);
		}

		[Test]
		public void ConstructorMachineContextFalse () 
		{
			X509Chain c = new X509Chain (false);
			// default properties
			AssertEquals ("ChainElements", 0, c.ChainElements.Count);
			AssertNotNull ("ChainPolicy", c.ChainPolicy);
			AssertEquals ("ChainStatus", 0, c.ChainStatus.Length);
		}

		[Test]
		public void ConstructorMachineContextTrue () 
		{
			X509Chain c = new X509Chain (true);
			// default properties
			AssertEquals ("ChainElements", 0, c.ChainElements.Count);
			AssertNotNull ("ChainPolicy", c.ChainPolicy);
			AssertEquals ("ChainStatus", 0, c.ChainStatus.Length);
		}

		[Test]
		public void StaticCreation () 
		{
			X509Chain c = X509Chain.Create ();
			// default properties
			AssertEquals ("ChainElements", 0, c.ChainElements.Count);
			AssertNotNull ("ChainPolicy", c.ChainPolicy);
			AssertEquals ("ChainStatus", 0, c.ChainStatus.Length);
		}
	}
}

#endif