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:
authorSebastien Pouliot <sebastien@ximian.com>2004-04-13 22:37:02 +0400
committerSebastien Pouliot <sebastien@ximian.com>2004-04-13 22:37:02 +0400
commitdae00e3334d15d9e2f62aaf90bb1388c32baa4f9 (patch)
tree7992d2de67d5f7e9bbc807eef5b36c62d07d2cac /mcs/class/Mono.Security.Win32
parente2a0fbd2dd29978086ddc2bed89352baa33da1d5 (diff)
2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
* MD2Test.cs: Removed obsolete NUnit1 TestCase references. * MD4Test.cs: Removed obsolete NUnit1 TestCase references. * MD5Test.cs: Removed obsolete NUnit1 TestCase references. * MD5Test.cs: Removed obsolete NUnit1 TestCase references. * RandomNumberGeneratorTest.cs: Removed obsolete NUnit1 TestCase and SetUp references. * SHA1Test.cs: Removed obsolete NUnit1 TestCase references. svn path=/trunk/mcs/; revision=25427
Diffstat (limited to 'mcs/class/Mono.Security.Win32')
-rw-r--r--mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/ChangeLog10
-rw-r--r--mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD2Test.cs14
-rw-r--r--mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD4Test.cs14
-rw-r--r--mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD5Test.cs14
-rw-r--r--mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/RandomNumberGeneratorTest.cs5
-rw-r--r--mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/SHA1Test.cs18
6 files changed, 43 insertions, 32 deletions
diff --git a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/ChangeLog b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/ChangeLog
index 9c705dd7108..95e5c906fc1 100644
--- a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/ChangeLog
+++ b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/ChangeLog
@@ -1,3 +1,13 @@
+2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
+
+ * MD2Test.cs: Removed obsolete NUnit1 TestCase references.
+ * MD4Test.cs: Removed obsolete NUnit1 TestCase references.
+ * MD5Test.cs: Removed obsolete NUnit1 TestCase references.
+ * MD5Test.cs: Removed obsolete NUnit1 TestCase references.
+ * RandomNumberGeneratorTest.cs: Removed obsolete NUnit1 TestCase
+ and SetUp references.
+ * SHA1Test.cs: Removed obsolete NUnit1 TestCase references.
+
2003-02-05 Sebastien Pouliot <spouliot@videotron.ca>
* MD2CryptoServiceProviderTest.cs: New. Run the MD2Test
diff --git a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD2Test.cs b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD2Test.cs
index 8c9a5a4ec86..a6a92f06430 100644
--- a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD2Test.cs
+++ b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD2Test.cs
@@ -31,9 +31,9 @@ public class MD2Test {
if ((array1 == null) && (array2 == null))
return;
if (array1 == null)
- TestCase.Fail (msg + " -> First array is NULL");
+ Assertion.Fail (msg + " -> First array is NULL");
if (array2 == null)
- TestCase.Fail (msg + " -> Second array is NULL");
+ Assertion.Fail (msg + " -> Second array is NULL");
bool a = (array1.Length == array2.Length);
if (a) {
@@ -48,7 +48,7 @@ public class MD2Test {
msg += " -> Expected " + BitConverter.ToString (array1, 0);
msg += " is different than " + BitConverter.ToString (array2, 0);
}
- TestCase.Assert (msg, a);
+ Assertion.Assert (msg, a);
}
// MD2 ("") = 8350e5a3e24c153df2275c9f80692773
@@ -208,7 +208,7 @@ public class MD2Test {
for (int i=0; i < input.Length - 1; i++)
hash.TransformBlock (input, i, 1, copy, i);
byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
- TestCase.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
+ Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
AssertEquals (testName + ".e.2", result, hash.Hash);
// required or next operation will still return old hash
hash.Initialize ();
@@ -218,9 +218,9 @@ public class MD2Test {
public virtual void StaticInfo ()
{
string className = hash.ToString ();
- TestCase.AssertEquals (className + ".HashSize", 128, hash.HashSize);
- TestCase.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
- TestCase.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+ Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
+ Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
+ Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
}
}
diff --git a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD4Test.cs b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD4Test.cs
index 24e4296f8ed..308b689b91c 100644
--- a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD4Test.cs
+++ b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD4Test.cs
@@ -31,9 +31,9 @@ public class MD4Test {
if ((array1 == null) && (array2 == null))
return;
if (array1 == null)
- TestCase.Fail (msg + " -> First array is NULL");
+ Assertion.Fail (msg + " -> First array is NULL");
if (array2 == null)
- TestCase.Fail (msg + " -> Second array is NULL");
+ Assertion.Fail (msg + " -> Second array is NULL");
bool a = (array1.Length == array2.Length);
if (a) {
@@ -48,7 +48,7 @@ public class MD4Test {
msg += " -> Expected " + BitConverter.ToString (array1, 0);
msg += " is different than " + BitConverter.ToString (array2, 0);
}
- TestCase.Assert (msg, a);
+ Assertion.Assert (msg, a);
}
// MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
@@ -208,7 +208,7 @@ public class MD4Test {
for (int i=0; i < input.Length - 1; i++)
hash.TransformBlock (input, i, 1, copy, i);
byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
- TestCase.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
+ Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
AssertEquals (testName + ".e.2", result, hash.Hash);
// required or next operation will still return old hash
hash.Initialize ();
@@ -218,9 +218,9 @@ public class MD4Test {
public virtual void StaticInfo ()
{
string className = hash.ToString ();
- TestCase.AssertEquals (className + ".HashSize", 128, hash.HashSize);
- TestCase.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
- TestCase.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+ Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
+ Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
+ Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
}
}
diff --git a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD5Test.cs b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD5Test.cs
index c6fa31e452d..1eb70789380 100644
--- a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD5Test.cs
+++ b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/MD5Test.cs
@@ -33,9 +33,9 @@ public class MD5Test {
if ((array1 == null) && (array2 == null))
return;
if (array1 == null)
- TestCase.Fail (msg + " -> First array is NULL");
+ Assertion.Fail (msg + " -> First array is NULL");
if (array2 == null)
- TestCase.Fail (msg + " -> Second array is NULL");
+ Assertion.Fail (msg + " -> Second array is NULL");
bool a = (array1.Length == array2.Length);
if (a) {
@@ -50,7 +50,7 @@ public class MD5Test {
msg += " -> Expected " + BitConverter.ToString (array1, 0);
msg += " is different than " + BitConverter.ToString (array2, 0);
}
- TestCase.Assert (msg, a);
+ Assertion.Assert (msg, a);
}
// MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
@@ -210,7 +210,7 @@ public class MD5Test {
for (int i=0; i < input.Length - 1; i++)
hash.TransformBlock (input, i, 1, copy, i);
byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
- TestCase.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
+ Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
AssertEquals (testName + ".e.2", result, hash.Hash);
// required or next operation will still return old hash
hash.Initialize ();
@@ -220,9 +220,9 @@ public class MD5Test {
public virtual void StaticInfo ()
{
string className = hash.ToString ();
- TestCase.AssertEquals (className + ".HashSize", 128, hash.HashSize);
- TestCase.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
- TestCase.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+ Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
+ Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
+ Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
}
}
diff --git a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/RandomNumberGeneratorTest.cs b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/RandomNumberGeneratorTest.cs
index 7889bfd5c92..7b153785e61 100644
--- a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/RandomNumberGeneratorTest.cs
+++ b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/RandomNumberGeneratorTest.cs
@@ -26,11 +26,12 @@ namespace MonoTests.Security.Cryptography {
// not implemented
// http://www.ietf.org/rfc/rfc1750.txt
-public class RandomNumberGeneratorTest : TestCase {
+public class RandomNumberGeneratorTest : Assertion {
protected RandomNumberGenerator rng;
- protected override void SetUp ()
+ [SetUp]
+ void Create ()
{
rng = new Mono.Security.Cryptography.RNGCryptoServiceProvider ();
}
diff --git a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/SHA1Test.cs b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/SHA1Test.cs
index 5c00790d219..0ef2206f50b 100644
--- a/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/SHA1Test.cs
+++ b/mcs/class/Mono.Security.Win32/Test/Mono.Security.Cryptography/SHA1Test.cs
@@ -33,9 +33,9 @@ public class SHA1Test {
if ((array1 == null) && (array2 == null))
return;
if (array1 == null)
- TestCase.Fail (msg + " -> First array is NULL");
+ Assertion.Fail (msg + " -> First array is NULL");
if (array2 == null)
- TestCase.Fail (msg + " -> Second array is NULL");
+ Assertion.Fail (msg + " -> Second array is NULL");
bool a = (array1.Length == array2.Length);
if (a) {
@@ -48,7 +48,7 @@ public class SHA1Test {
}
msg += " -> Expected " + BitConverter.ToString (array1, 0);
msg += " is different than " + BitConverter.ToString (array2, 0);
- TestCase.Assert (msg, a);
+ Assertion.Assert (msg, a);
}
[SetUp]
@@ -63,12 +63,12 @@ public class SHA1Test {
{
// test all values static for SHA1
string className = hash.ToString ();
- TestCase.AssertEquals (className + ".HashSize", 160, hash.HashSize);
- TestCase.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
- TestCase.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
- TestCase.AssertEquals (className + ".CanReuseTransform", true, hash.CanReuseTransform);
- TestCase.AssertEquals (className + ".CanTransformMultipleBlocks", true, hash.CanTransformMultipleBlocks);
- TestCase.AssertEquals (className + ".ToString()", "Mono.Security.Cryptography.SHA1CryptoServiceProvider", className);
+ Assertion.AssertEquals (className + ".HashSize", 160, hash.HashSize);
+ Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
+ Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+ Assertion.AssertEquals (className + ".CanReuseTransform", true, hash.CanReuseTransform);
+ Assertion.AssertEquals (className + ".CanTransformMultipleBlocks", true, hash.CanTransformMultipleBlocks);
+ Assertion.AssertEquals (className + ".ToString()", "Mono.Security.Cryptography.SHA1CryptoServiceProvider", className);
}
// First test, we hash the string "abc"