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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2014-09-26 16:43:36 +0400
committerAlexander Köplinger <alex.koeplinger@outlook.com>2015-01-17 07:45:39 +0300
commit746650d1b93114b60feb155c2ee778a9e16ccb6d (patch)
treef8e1eb791640ba6fd887da5e64cde3a1139b42b0 /mcs/class/System.Security/Test/System.Security.Cryptography.Xml
parent7d1cd56c5d97683f6dae35cb9143d8789b71c2de (diff)
[bcl] Remove more NET_2_0 checks from class libs
Diffstat (limited to 'mcs/class/System.Security/Test/System.Security.Cryptography.Xml')
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs74
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs31
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs10
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs2
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs33
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs13
-rw-r--r--mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs2
15 files changed, 0 insertions, 181 deletions
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.cs
index f12c1bc2419..ff8ffb6689b 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.cs
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Security.Cryptography;
@@ -53,4 +52,3 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
}
-#endif
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs
index 45bab5fda11..6949154ec0b 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs
@@ -7,7 +7,6 @@
// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
//
-#if NET_2_0
using System;
using System.Collections;
@@ -296,4 +295,3 @@ namespace MonoTests.System.Security.Cryptography.Xml
}
}
}
-#endif
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs
index 2f6a78e544c..58cdf2d830e 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs
@@ -66,7 +66,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
static byte[] x509crl = { 0x30, 0x82, 0x01, 0x05, 0x30, 0x72, 0x02, 0x01, 0x01, 0x30, 0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x30, 0x51, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x0F, 0x55, 0x2E, 0x53, 0x2E, 0x20, 0x47, 0x6F, 0x76, 0x65, 0x72, 0x6E, 0x6D, 0x65, 0x6E, 0x74, 0x31, 0x0C, 0x30, 0x0A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x03, 0x44, 0x6F, 0x44, 0x31, 0x1A, 0x30, 0x18, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x11, 0x41, 0x72, 0x6D, 0x65, 0x64, 0x20, 0x46, 0x6F, 0x72, 0x63, 0x65, 0x73, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x17, 0x0D, 0x30, 0x32, 0x31, 0x30, 0x31, 0x31, 0x31, 0x33, 0x31, 0x32, 0x35, 0x30, 0x5A, 0x30, 0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x03, 0x81, 0x81, 0x00, 0x7D, 0xA2, 0xD1, 0x19, 0x6D, 0x0F, 0x0F, 0xCB, 0xE4, 0xA3, 0xBE, 0xE0, 0x36, 0x0A, 0xF3, 0x4C, 0x9B, 0xAF, 0xE6, 0x4F, 0xF6, 0xE3, 0xAF, 0xCF, 0x55, 0xF3, 0xC6, 0xDB, 0xAB, 0x4C, 0x16, 0x32, 0xAA, 0x73, 0xAD, 0xCC, 0xDC, 0x32, 0x33, 0x60, 0xDF, 0x8B, 0xCC, 0x93, 0xB5, 0x4F, 0x6A, 0xEC, 0x70, 0x53, 0xAF, 0xCF, 0x07, 0x0F, 0xA0, 0xCD, 0x66, 0xAC, 0x00, 0x57, 0xC6, 0x5C, 0x5D, 0x21, 0xB1, 0xBD, 0x30, 0x89, 0x8E, 0x77, 0x8D, 0xD4, 0x69, 0x7E, 0xC0, 0x36, 0x7E, 0xD2, 0xD8, 0x20, 0x71, 0x08, 0x80, 0xD2, 0xCB, 0x74, 0x8B, 0xD8, 0x42, 0x17, 0x04, 0x99, 0x80, 0xA4, 0x52, 0x70, 0x2E, 0xC0, 0xE3, 0x8C, 0x0B, 0xFF, 0x79, 0xB7, 0x45, 0x77, 0xDC, 0xC5, 0xCF, 0x43, 0x98, 0x91, 0x7D, 0xF1, 0x01, 0xF7, 0x53, 0xD7, 0xC6, 0x51, 0x35, 0xF0, 0x89, 0xCC, 0xC1, 0xFF, 0xE2, 0x89 };
-#if NET_2_0
[Test]
public void Constructor_Empty ()
{
@@ -85,40 +84,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
{
KeyInfoX509Data data = new KeyInfoX509Data ((X509Certificate)null);
}
-#else
- [Test]
- [ExpectedException (typeof (CryptographicException))]
- public void Constructor_Empty ()
- {
- KeyInfoX509Data data = new KeyInfoX509Data ();
- XmlElement invalid = data.GetXml ();
- }
-
- [Test]
- public void Constructor_X509Certificate_Null ()
- {
- KeyInfoX509Data data = new KeyInfoX509Data ((X509Certificate)null);
- }
-
- [Test]
- [ExpectedException (typeof (ArgumentNullException))]
- [Category ("NotWorking")]
- public void Constructor_X509Certificate_Null_GetXml ()
- {
- KeyInfoX509Data data = new KeyInfoX509Data ((X509Certificate)null);
- XmlElement invalid = data.GetXml ();
- // note: even if we add a check in GetXml this will makes another unit
- // test fails. We clearly are not doing this the same way as MS does.
- }
-
- [Test]
- [ExpectedException (typeof (ArgumentNullException))]
- public void Constructor_X509CertificateByteArray_Null_GetXml ()
- {
- KeyInfoX509Data data = new KeyInfoX509Data ((byte[])null);
- XmlElement invalid = data.GetXml ();
- }
-#endif
[Test]
public void Constructor_X509CertificateByteArray_Null ()
{
@@ -144,7 +109,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
Assert.AreEqual ((data2.GetXml ().OuterXml), (data3.GetXml ().OuterXml), "data2==data3");
}
-#if NET_2_0
[Test]
public void Constructor_X509Certificate_X509IncludeOption ()
{
@@ -199,42 +163,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
KeyInfoX509Data data = new KeyInfoX509Data ();
data.AddIssuerSerial ("issuer", null);
}
-#else
- [Test]
- public void AddCertificate_Null ()
- {
- KeyInfoX509Data data = new KeyInfoX509Data ();
- data.AddCertificate (null);
- }
-
-
- [Test]
- [ExpectedException (typeof (NullReferenceException))]
- public void AddCertificate_Null_GetXml ()
- {
- KeyInfoX509Data data = new KeyInfoX509Data ();
- data.AddCertificate (null);
- XmlElement empty = data.GetXml ();
- }
-
- [Test]
- public void AddIssuerSerial_Null_Serial ()
- {
- KeyInfoX509Data data = new KeyInfoX509Data ();
- data.AddIssuerSerial (null, "serial");
- XmlElement empty = data.GetXml ();
- Assert.AreEqual (empty.OuterXml, "<X509Data xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><X509IssuerSerial><X509IssuerName></X509IssuerName><X509SerialNumber>serial</X509SerialNumber></X509IssuerSerial></X509Data>");
- }
-
- [Test]
- public void AddIssuerSerial_Issuer_Null ()
- {
- KeyInfoX509Data data = new KeyInfoX509Data ();
- data.AddIssuerSerial ("issuer", null);
- XmlElement empty = data.GetXml ();
- Assert.AreEqual (empty.OuterXml, "<X509Data xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><X509IssuerSerial><X509IssuerName>issuer</X509IssuerName><X509SerialNumber></X509SerialNumber></X509IssuerSerial></X509Data>");
- }
-#endif
[Test]
public void AddSubjectKeyId_Byte_Null ()
@@ -249,7 +177,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
// beta2 bug - throw an ArgumentNullException (a little too late)
// Assert.AreEqual ("<X509Data xmlns=\"http://www.w3.org/2000/09/xmldsig#\" />", data.GetXml ().OuterXml);
}
-#if NET_2_0
[Test]
[Category ("NotWorking")] // beta2 bug
[ExpectedException (typeof (NullReferenceException))]
@@ -272,7 +199,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
Assert.AreEqual (1, data.SubjectKeyIds.Count, "SubjectKeyIds");
Assert.IsNull (data.SubjectNames, "SubjectNames");
}
-#endif
[Test]
public void AddSubjectName_Null ()
{
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs
index a776b19274f..8920ac34218 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs
@@ -158,11 +158,9 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if NET_2_0
[Category ("NotDotNet")]
// MS throws a NullReferenceException (reported as FDBK25886) but only when executed in NUnit
// http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=3596d1e3-362b-40bd-bca9-2e8be75261ff
-#endif
public void AddAllTransforms ()
{
// adding an empty hash value
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs
index b850fa5f359..d96e26fd0b4 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs
@@ -147,11 +147,9 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if NET_2_0
// urn:foo is'nt accepted when calling GetXml
[ExpectedException (typeof (CryptographicException))]
[Category ("NotWorking")]
-#endif
public void GetXmlWithSetProperty ()
{
XmlDocument doc = new XmlDocument ();
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs
index 4c7c6131087..0a71f570a9e 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs
@@ -75,10 +75,8 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if NET_2_0
[Ignore ("2.0 throws a NullReferenceException - reported as FDBK25892")]
// http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=02dd9730-d1ad-4170-8c82-36858c55fbe2
-#endif
[ExpectedException (typeof (ArgumentNullException))]
public void Constructor_XmlDocument_Null ()
{
@@ -100,9 +98,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if !NET_2_0
- [ExpectedException (typeof (CryptographicException))]
-#endif
public void Constructor_XmlElement_WithoutLoadXml ()
{
XmlDocument doc = new XmlDocument ();
@@ -341,11 +336,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
// Compute the signature.
byte[] secretkey = Encoding.Default.GetBytes ("password");
HMACSHA1 hmac = new HMACSHA1 (secretkey);
-#if NET_2_0
Assert.AreEqual (0, signedXml.KeyInfo.Count, "KeyInfo");
-#else
- Assert.IsNull (signedXml.KeyInfo, "KeyInfo");
-#endif
Assert.IsNull (signedXml.SignatureLength, "SignatureLength");
Assert.IsNull (signedXml.SignatureMethod, "SignatureMethod");
Assert.IsNull (signedXml.SignatureValue, "SignatureValue");
@@ -353,11 +344,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
signedXml.ComputeSignature (hmac);
-#if NET_2_0
Assert.AreEqual (0, signedXml.KeyInfo.Count, "KeyInfo");
-#else
- Assert.IsNull (signedXml.KeyInfo, "KeyInfo");
-#endif
Assert.IsNull (signedXml.SignatureLength, "SignatureLength");
Assert.AreEqual (SignedXml.XmlDsigHMACSHA1Url, signedXml.SignatureMethod, "SignatureMethod");
Assert.AreEqual (20, signedXml.SignatureValue.Length, "SignatureValue");
@@ -480,7 +467,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
AsymmetricAlgorithm aa2 = sxe.PublicGetPublicKey ();
Assert.IsNull (aa2, "Second Public Key is null");
}
-#if NET_2_0
[Test]
// [ExpectedException (typeof (ArgumentNullException))]
public void AddObject_Null ()
@@ -497,16 +483,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
SignedXml sx = new SignedXml ();
sx.AddReference (null);
}
-#else
- [Test]
- public void Add_Null ()
- {
- SignedXml sx = new SignedXml ();
- // no ArgumentNull exceptions for those
- sx.AddObject (null);
- sx.AddReference (null);
- }
-#endif
[Test]
[ExpectedException (typeof (CryptographicException))]
public void GetXml_WithoutInfo ()
@@ -553,9 +529,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if !NET_2_0
- [ExpectedException (typeof (CryptographicException))]
-#endif
public void CheckSignatureEmpty ()
{
SignedXml sx = new SignedXml ();
@@ -681,7 +654,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
Assert.IsNull (sign.GetIdElement (new XmlDocument (), null));
}
-#if NET_2_0
[Test]
[Category ("NotWorking")] // bug #79483
public void DigestValue_CRLF ()
@@ -1374,7 +1346,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
// verify MS-generated signature
Assert.IsTrue (sign.CheckSignature (new HMACRIPEMD160 (hmackey)));
}
-#endif
// CVE-2009-0217
// * a 0-length signature is the worse case - it accepts anything
// * between 1-7 bits length are considered invalid (not a multiple of 8)
@@ -1502,7 +1473,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
SignedXml sign = GetSignedXml (xml);
Assert.IsTrue (sign.CheckSignature (new HMACSHA1 (Encoding.ASCII.GetBytes ("secret"))));
}
-#if NET_2_0
[Test]
[Category ("NotDotNet")] // will fail until a fix is available
public void VerifyHMAC_SmallerHalfLength ()
@@ -1521,7 +1491,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
SignedXml sign = GetSignedXml (xml);
Assert.IsTrue (sign.CheckSignature (new HMACSHA256 (Encoding.ASCII.GetBytes ("secret"))));
}
-#endif
[Test]
public void VerifyHMAC_FullLength ()
{
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs
index c831ed020e6..ab9d2bb2e30 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs
@@ -74,13 +74,11 @@ namespace MonoTests.System.Security.Cryptography.Xml {
[TestFixture]
public class TransformTest {
-#if NET_2_0
[Test]
[ExpectedException (typeof (NullReferenceException))]
public void GetDigestedOutput_Null ()
{
new ConcreteTransform ().GetDigestedOutput (null);
}
-#endif
}
}
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs
index 4ed8a0204b5..a2a2c841eb8 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using NUnit.Framework;
@@ -70,4 +69,3 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
}
-#endif
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs
index 43cf7df2afc..abb64bb34b5 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs
@@ -507,7 +507,6 @@ namespace MonoTests.System.Security.Cryptography.Xml {
Assert.AreEqual (xml, output);
}
-#if NET_2_0
[Test]
public void PrefixlessNamespaceOutput ()
{
@@ -545,6 +544,5 @@ namespace MonoTests.System.Security.Cryptography.Xml {
{
new XmlDsigExcC14NTransform ().GetDigestedOutput (null);
}
-#endif
}
}
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs
index a97701123cf..a3608afc000 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs
@@ -97,11 +97,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
Assert.AreEqual (null, xnl, "Default InnerXml");
}
-#if NET_2_0
[ExpectedException (typeof (ArgumentException))]
-#else
- // LAMESPEC: input MUST be one of InputType - but no exception is thrown (not documented)
-#endif
public void LoadInputWithUnsupportedType ()
{
byte[] bad = { 0xBA, 0xD };
@@ -129,19 +125,15 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (SecurityException))]
-#endif
public void C14NSpecExample1_WithoutResolver ()
{
using (StreamWriter sw = new StreamWriter ("doc.dtd", false, Encoding.ASCII)) {
sw.Write ("<!-- presence, not content, required -->");
sw.Close ();
}
-#if NET_2_0
if (!SecurityManager.SecurityEnabled)
NUnit.Framework.Assert.Ignore ("SecurityManager isn't enabled.");
-#endif
string res = ExecuteXmlDSigC14NTransform (C14NSpecExample1Input, false);
Assert.AreEqual (C14NSpecExample1Output, res, "Example 1 from c14n spec - PIs, Comments, and Outside of Document Element (with comments)");
}
@@ -203,10 +195,8 @@ namespace MonoTests.System.Security.Cryptography.Xml {
vreader.ValidationType = ValidationType.None;
vreader.EntityHandling = EntityHandling.ExpandCharEntities;
doc.Load (vreader);
-#if NET_2_0
if (resolver)
transform.Resolver = new XmlUrlResolver ();
-#endif
transform.LoadInput (doc);
return Stream2String ((Stream)transform.GetOutput ());
}
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs
index 50fb9ba480f..7b56a240055 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs
@@ -19,7 +19,6 @@
// output XML. So, they are *not* from c14n specification.
//
-#if NET_2_0
using System;
using System.IO;
@@ -598,4 +597,3 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
}
-#endif
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs
index 7d1ca4b4071..9562da1864e 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs
@@ -14,7 +14,6 @@
// (C) 2008 Gert Driesen
//
-#if NET_2_0
using System;
using System.IO;
@@ -140,4 +139,3 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
}
-#endif
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs
index a3fa4215609..43bb7f079bb 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs
@@ -86,9 +86,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if NET_2_0
[Ignore ("throws a NullReferenceException - but it's (kind of internal)")]
-#endif
public void GetInnerXml ()
{
XmlNodeList xnl = transform.UnprotectedGetInnerXml ();
@@ -105,9 +103,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
XmlNodeList inner = InnerXml (""); // empty
transform.LoadInnerXml (inner);
XmlNodeList xnl = (XmlNodeList) transform.GetOutput ();
-#if NET_2_0
Assert.AreEqual (0, xnl.Count, "Count");
-#endif
}
private XmlDocument GetDoc ()
@@ -132,9 +128,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if NET_2_0
[Category ("NotWorking")]
-#endif
public void LoadInputAsXmlDocument ()
{
XmlDocument doc = GetDoc ();
@@ -142,11 +136,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
XmlNodeList inner = InnerXml ("//*/title");
transform.LoadInnerXml (inner);
XmlNodeList xnl = (XmlNodeList) transform.GetOutput ();
-#if NET_2_0
Assert.AreEqual (73, xnl.Count);
-#else
- Assert.AreEqual (47, xnl.Count);
-#endif
}
[Test]
@@ -182,9 +172,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if NET_2_0
[Category ("NotWorking")]
-#endif
public void LoadInputAsStream ()
{
XmlDocument doc = GetDoc ();
@@ -196,11 +184,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
XmlNodeList inner = InnerXml ("//*/title");
transform.LoadInnerXml (inner);
XmlNodeList xnl = (XmlNodeList) transform.GetOutput ();
-#if NET_2_0
Assert.AreEqual (73, xnl.Count);
-#else
- Assert.AreEqual (47, xnl.Count);
-#endif
}
[Test]
@@ -291,39 +275,22 @@ namespace MonoTests.System.Security.Cryptography.Xml {
doc.LoadXml ("<element xmlns='urn:foo'><foo><bar>test</bar></foo></element>");
t.LoadInput (doc);
nl = (XmlNodeList) t.GetOutput ();
-#if NET_2_0
Assert.AreEqual (0, nl.Count, "1");
-#else
- Assert.AreEqual (1, nl.Count, "1");
-#endif
doc.LoadXml ("<element xmlns='urn:foo'><foo xmlns='urn:bar'><bar>test</bar></foo></element>");
t.LoadInput (doc);
nl = (XmlNodeList) t.GetOutput ();
-#if NET_2_0
Assert.AreEqual (0, nl.Count, "2");
-#else
- Assert.AreEqual (2, nl.Count, "2");
-#endif
doc.LoadXml ("<element xmlns='urn:foo' xmlns:x='urn:x'><foo xmlns='urn:bar'><bar>test</bar></foo></element>");
t.LoadInput (doc);
nl = (XmlNodeList) t.GetOutput ();
-#if NET_2_0
Assert.AreEqual (0, nl.Count, "3");
-#else
- Assert.AreEqual (3, nl.Count, "3");
-#endif
doc.LoadXml ("<envelope><Signature xmlns='http://www.w3.org/2000/09/xmldsig#'><XPath>blah</XPath></Signature></envelope>");
t.LoadInput (doc);
nl = (XmlNodeList) t.GetOutput ();
-#if NET_2_0
Assert.AreEqual (0, nl.Count, "4");
-#else
- Assert.AreEqual (1, nl.Count, "4");
- Assert.AreEqual (XmlNodeType.Attribute, nl [0].NodeType, "NodeType");
-#endif
}
}
}
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs
index 2074c79333b..cc44b12d4c5 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs
@@ -117,11 +117,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentNullException))]
-#else
- [ExpectedException (typeof (NullReferenceException))]
-#endif
public void EmptyXslt ()
{
string test = "<Test>XmlDsigXsltTransform</Test>";
@@ -158,15 +154,10 @@ namespace MonoTests.System.Security.Cryptography.Xml {
transform.LoadInnerXml (doc.ChildNodes);
Stream s = (Stream) transform.GetOutput ();
}
-#if NET_2_0
catch (Exception e) {
// we must deal with an internal exception
result = (e.GetType ().ToString ().EndsWith ("XsltLoadException"));
result = true;
-#else
- catch (XsltCompileException) {
- result = true;
-#endif
}
finally {
Assert.IsTrue (result, "Exception not thrown");
@@ -174,11 +165,7 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentNullException))]
-#else
- [ExpectedException (typeof (NullReferenceException))]
-#endif
public void OnlyInner ()
{
string test = "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns=\"http://www.w3.org/TR/xhtml1/strict\" version=\"1.0\">";
diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs
index ecc16f62a46..ab05a297dc4 100644
--- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs
+++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs
@@ -13,7 +13,6 @@
// (C) 2008 Gert Driesen
//
-#if NET_2_0
using System;
using System.IO;
@@ -90,4 +89,3 @@ namespace MonoTests.System.Security.Cryptography.Xml {
}
}
-#endif