if ((array1 == null) && (array2 == null))
return;
if (array1 == null)
- Assertion.Fail (msg + " -> First array is NULL");
+ Assert.Fail (msg + " -> First array is NULL");
if (array2 == null)
- Assertion.Fail (msg + " -> Second array is NULL");
+ Assert.Fail (msg + " -> Second array is NULL");
bool a = (array1.Length == array2.Length);
if (a) {
msg += " -> Expected " + BitConverter.ToString (array1, 0);
msg += " is different than " + BitConverter.ToString (array2, 0);
}
- Assertion.Assert (msg, a);
+ Assert.IsTrue (a, msg);
}
// MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
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);
- Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
+ Assert.AreEqual (input [input.Length - 1], output [0], testName + ".e.1");
AssertEquals (testName + ".e.2", result, hash.Hash);
// required or next operation will still return old hash
hash.Initialize ();
public virtual void StaticInfo ()
{
string className = hash.ToString ();
- Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
- Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
- Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
+ Assert.AreEqual (128, hash.HashSize, className + ".HashSize");
+ Assert.AreEqual (1, hash.InputBlockSize, className + ".InputBlockSize");
+ Assert.AreEqual (1, hash.OutputBlockSize, className + ".OutputBlockSize");
}
}