Files
mono/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509ChainTest.cs
T
Martin Baulig dfedf08d98 2004-04-22 Martin Baulig <[email protected]>
Renamed the `NET_1_2' conditional to `NET_2_0' in all files.

svn path=/trunk/mcs/; revision=25877
2004-04-23 02:24:02 +00:00

65 lines
1.5 KiB
C#
Executable File

//
// X509ChainTest.cs - NUnit tests for X509Chain
//
// Author:
// Sebastien Pouliot ([email protected])
//
// (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