| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // TestSuite.System.Security.Cryptography.Xml.AllTests.cs
- //
- // Author:
- // Sebastien Pouliot ([email protected])
- //
- // (C) 2002 Motus Technologies Inc. (http://www.motus.com)
- //
- using System;
- using System.Security.Cryptography;
- using NUnit.Framework;
- namespace MonoTests.System.Security.Cryptography.Xml {
- public class AllTests : TestCase {
- public AllTests (string name) : base (name) {}
-
- // because most crypto stuff works with byte[] buffers
- static public void AssertEquals (string msg, byte[] array1, byte[] array2)
- {
- if ((array1 == null) && (array2 == null))
- return;
- if (array1 == null)
- Fail (msg + " -> First array is NULL");
- if (array2 == null)
- Fail (msg + " -> Second array is NULL");
- bool a = (array1.Length == array2.Length);
- if (a) {
- for (int i = 0; i < array1.Length; i++) {
- if (array1 [i] != array2 [i]) {
- a = false;
- break;
- }
- }
- }
- msg += " -> Expected " + BitConverter.ToString (array1, 0);
- msg += " is different than " + BitConverter.ToString (array2, 0);
- Assert (msg, a);
- }
- public static ITest Suite {
- get {
- TestSuite suite = new TestSuite ();
- suite.AddTest (DataObjectTest.Suite);
- suite.AddTest (DSAKeyValueTest.Suite);
- suite.AddTest (KeyInfoNameTest.Suite);
- suite.AddTest (KeyInfoNodeTest.Suite);
- suite.AddTest (KeyInfoRetrievalMethodTest.Suite);
- suite.AddTest (KeyInfoTest.Suite);
- suite.AddTest (KeyInfoX509DataTest.Suite);
- suite.AddTest (ReferenceTest.Suite);
- suite.AddTest (RSAKeyValueTest.Suite);
- suite.AddTest (SignatureTest.Suite);
- suite.AddTest (SignedInfoTest.Suite);
- suite.AddTest (SignedXmlTest.Suite);
- suite.AddTest (TransformChainTest.Suite);
- suite.AddTest (XmlDsigBase64TransformTest.Suite);
- suite.AddTest (XmlDsigXsltTransformTest.Suite);
- return suite;
- }
- }
- }
- }
|