diff --git a/Tests/NFUnitTestArithmetic/NFUnitTestArithmetic.nfproj b/Tests/NFUnitTestArithmetic/NFUnitTestArithmetic.nfproj index 8b794b66..51da889c 100644 --- a/Tests/NFUnitTestArithmetic/NFUnitTestArithmetic.nfproj +++ b/Tests/NFUnitTestArithmetic/NFUnitTestArithmetic.nfproj @@ -38,7 +38,7 @@ - + @@ -48,6 +48,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest1.cs b/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest1.cs index 8647a342..5776214d 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest1.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest1.cs @@ -16,7 +16,7 @@ public void Arith_arith001_Test() { OutputHelper.WriteLine("Section 7.4 "); OutputHelper.WriteLine("This code tests basic literal integral arthimetic additive expressions."); - Assert.True(Arith_TestClass_arith001.testMethod()); + Assert.IsTrue(Arith_TestClass_arith001.testMethod()); } [TestMethod] @@ -24,7 +24,7 @@ public void Arith_arith003_Test() { OutputHelper.WriteLine("Section 7.4 "); OutputHelper.WriteLine("This code tests basic literal integral arthimetic multiplicative expressions."); - Assert.True(Arith_TestClass_arith003.testMethod()); + Assert.IsTrue(Arith_TestClass_arith003.testMethod()); } [TestMethod] @@ -32,7 +32,7 @@ public void Arith_arith005_Test() { OutputHelper.WriteLine("Section 7.4 "); OutputHelper.WriteLine("This code tests basic integral arthimetic additive expressions using variables."); - Assert.True(Arith_TestClass_arith005.testMethod()); + Assert.IsTrue(Arith_TestClass_arith005.testMethod()); } [TestMethod] @@ -40,7 +40,7 @@ public void Arith_arith007_Test() { OutputHelper.WriteLine("Section 7.4 "); OutputHelper.WriteLine("This code tests basic integral arthimetic multiplicative expressions with variables."); - Assert.True(Arith_TestClass_arith007.testMethod()); + Assert.IsTrue(Arith_TestClass_arith007.testMethod()); } [TestMethod] @@ -48,7 +48,7 @@ public void Arith_arith023_Test() { OutputHelper.WriteLine("Section 7.4 "); OutputHelper.WriteLine("This code tests enum additive expressions."); - Assert.True(Arith_TestClass_arith023.testMethod()); + Assert.IsTrue(Arith_TestClass_arith023.testMethod()); } [TestMethod] @@ -56,266 +56,266 @@ public void Arith_arith024_Test() { OutputHelper.WriteLine("Section 7.4 "); OutputHelper.WriteLine("This code tests enum additive expressions."); - Assert.True(Arith_TestClass_arith024.testMethod()); + Assert.IsTrue(Arith_TestClass_arith024.testMethod()); } [TestMethod] public void Arith_arith028_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith028.testMethod()); + Assert.IsTrue(Arith_TestClass_arith028.testMethod()); } [TestMethod] public void Arith_arith029_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith029.testMethod()); + Assert.IsTrue(Arith_TestClass_arith029.testMethod()); } [TestMethod] public void Arith_arith030_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith030.testMethod()); + Assert.IsTrue(Arith_TestClass_arith030.testMethod()); } [TestMethod] public void Arith_arith031_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith031.testMethod()); + Assert.IsTrue(Arith_TestClass_arith031.testMethod()); } [TestMethod] public void Arith_arith032_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith032.testMethod()); + Assert.IsTrue(Arith_TestClass_arith032.testMethod()); } [TestMethod] public void Arith_arith033_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith033.testMethod()); + Assert.IsTrue(Arith_TestClass_arith033.testMethod()); } [TestMethod] public void Arith_arith034_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith034.testMethod()); + Assert.IsTrue(Arith_TestClass_arith034.testMethod()); } [TestMethod] public void Arith_arith035_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith035.testMethod()); + Assert.IsTrue(Arith_TestClass_arith035.testMethod()); } [TestMethod] public void Arith_arith036_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith036.testMethod()); + Assert.IsTrue(Arith_TestClass_arith036.testMethod()); } [TestMethod] public void Arith_arith037_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith037.testMethod()); + Assert.IsTrue(Arith_TestClass_arith037.testMethod()); } [TestMethod] public void Arith_arith038_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith038.testMethod()); + Assert.IsTrue(Arith_TestClass_arith038.testMethod()); } [TestMethod] public void Arith_arith039_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith039.testMethod()); + Assert.IsTrue(Arith_TestClass_arith039.testMethod()); } [TestMethod] public void Arith_arith040_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith040.testMethod()); + Assert.IsTrue(Arith_TestClass_arith040.testMethod()); } [TestMethod] public void Arith_arith041_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith041.testMethod()); + Assert.IsTrue(Arith_TestClass_arith041.testMethod()); } [TestMethod] public void Arith_arith042_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith042.testMethod()); + Assert.IsTrue(Arith_TestClass_arith042.testMethod()); } [TestMethod] public void Arith_arith043_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith043.testMethod()); + Assert.IsTrue(Arith_TestClass_arith043.testMethod()); } [TestMethod] public void Arith_arith044_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith044.testMethod()); + Assert.IsTrue(Arith_TestClass_arith044.testMethod()); } [TestMethod] public void Arith_arith045_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith045.testMethod()); + Assert.IsTrue(Arith_TestClass_arith045.testMethod()); } [TestMethod] public void Arith_arith046_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith046.testMethod()); + Assert.IsTrue(Arith_TestClass_arith046.testMethod()); } [TestMethod] public void Arith_arith047_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith047.testMethod()); + Assert.IsTrue(Arith_TestClass_arith047.testMethod()); } [TestMethod] public void Arith_arith048_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith048.testMethod()); + Assert.IsTrue(Arith_TestClass_arith048.testMethod()); } [TestMethod] public void Arith_arith049_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith049.testMethod()); + Assert.IsTrue(Arith_TestClass_arith049.testMethod()); } [TestMethod] public void Arith_arith050_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith050.testMethod()); + Assert.IsTrue(Arith_TestClass_arith050.testMethod()); } [TestMethod] public void Arith_arith051_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith051.testMethod()); + Assert.IsTrue(Arith_TestClass_arith051.testMethod()); } [TestMethod] public void Arith_arith052_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith052.testMethod()); + Assert.IsTrue(Arith_TestClass_arith052.testMethod()); } [TestMethod] public void Arith_arith053_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith053.testMethod()); + Assert.IsTrue(Arith_TestClass_arith053.testMethod()); } [TestMethod] public void Arith_arith054_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith054.testMethod()); + Assert.IsTrue(Arith_TestClass_arith054.testMethod()); } [TestMethod] public void Arith_arith055_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith055.testMethod()); + Assert.IsTrue(Arith_TestClass_arith055.testMethod()); } [TestMethod] public void Arith_arith056_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith056.testMethod()); + Assert.IsTrue(Arith_TestClass_arith056.testMethod()); } [TestMethod] public void Arith_arith057_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith057.testMethod()); + Assert.IsTrue(Arith_TestClass_arith057.testMethod()); } [TestMethod] public void Arith_arith058_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith058.testMethod()); + Assert.IsTrue(Arith_TestClass_arith058.testMethod()); } [TestMethod] public void Arith_arith059_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith059.testMethod()); + Assert.IsTrue(Arith_TestClass_arith059.testMethod()); } [TestMethod] public void Arith_arith060_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith060.testMethod()); + Assert.IsTrue(Arith_TestClass_arith060.testMethod()); } [TestMethod] public void Arith_arith061_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith061.testMethod()); + Assert.IsTrue(Arith_TestClass_arith061.testMethod()); } [TestMethod] public void Arith_arith062_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith062.testMethod()); + Assert.IsTrue(Arith_TestClass_arith062.testMethod()); } [TestMethod] public void Arith_arith064_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith064.testMethod()); + Assert.IsTrue(Arith_TestClass_arith064.testMethod()); } [TestMethod] public void Arith_arith065_Test() { OutputHelper.WriteLine("Section 7.7"); - Assert.True(Arith_TestClass_arith065.testMethod()); + Assert.IsTrue(Arith_TestClass_arith065.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest2.cs b/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest2.cs index 48bf1997..f2c39ef5 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest2.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest2.cs @@ -16,723 +16,723 @@ class UnitTestArithmeticTest2 [TestMethod] public void Arith_opt001_Test() { - Assert.True(Arith_TestClass_opt001.testMethod()); + Assert.IsTrue(Arith_TestClass_opt001.testMethod()); } [TestMethod] public void Arith_opt002_Test() { - Assert.True(Arith_TestClass_opt002.testMethod()); + Assert.IsTrue(Arith_TestClass_opt002.testMethod()); } [TestMethod] public void Arith_opt003_Test() { - Assert.True(Arith_TestClass_opt003.testMethod()); + Assert.IsTrue(Arith_TestClass_opt003.testMethod()); } [TestMethod] public void Arith_opt004_Test() { - Assert.True(Arith_TestClass_opt004.testMethod()); + Assert.IsTrue(Arith_TestClass_opt004.testMethod()); } [TestMethod] public void Arith_mult0001_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0001.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0001.testMethod()); } [TestMethod] public void Arith_mult0002_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0002.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0002.testMethod()); } [TestMethod] public void Arith_mult0003_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0003.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0003.testMethod()); } [TestMethod] public void Arith_mult0004_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0004.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0004.testMethod()); } [TestMethod] public void Arith_mult0008_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0008.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0008.testMethod()); } [TestMethod] public void Arith_mult0009_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0009.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0009.testMethod()); } [TestMethod] public void Arith_mult0010_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0010.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0010.testMethod()); } [TestMethod] public void Arith_mult0011_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0011.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0011.testMethod()); } [TestMethod] public void Arith_mult0015_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0015.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0015.testMethod()); } [TestMethod] public void Arith_mult0016_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0016.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0016.testMethod()); } [TestMethod] public void Arith_mult0017_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0017.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0017.testMethod()); } [TestMethod] public void Arith_mult0018_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0018.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0018.testMethod()); } [TestMethod] public void Arith_mult0022_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0022.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0022.testMethod()); } [TestMethod] public void Arith_mult0023_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0023.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0023.testMethod()); } [TestMethod] public void Arith_mult0024_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0024.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0024.testMethod()); } [TestMethod] public void Arith_mult0025_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0025.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0025.testMethod()); } [TestMethod] public void Arith_mult0050_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0050.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0050.testMethod()); } [TestMethod] public void Arith_mult0051_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0051.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0051.testMethod()); } [TestMethod] public void Arith_mult0052_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0052.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0052.testMethod()); } [TestMethod] public void Arith_mult0053_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0053.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0053.testMethod()); } [TestMethod] public void Arith_mult0057_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0057.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0057.testMethod()); } [TestMethod] public void Arith_mult0058_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0058.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0058.testMethod()); } [TestMethod] public void Arith_mult0059_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0059.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0059.testMethod()); } [TestMethod] public void Arith_mult0060_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0060.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0060.testMethod()); } [TestMethod] public void Arith_mult0064_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0064.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0064.testMethod()); } [TestMethod] public void Arith_mult0065_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0065.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0065.testMethod()); } [TestMethod] public void Arith_mult0066_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0066.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0066.testMethod()); } [TestMethod] public void Arith_mult0067_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0067.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0067.testMethod()); } [TestMethod] public void Arith_mult0071_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0071.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0071.testMethod()); } [TestMethod] public void Arith_mult0072_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0072.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0072.testMethod()); } [TestMethod] public void Arith_mult0073_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0073.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0073.testMethod()); } [TestMethod] public void Arith_mult0074_Test() { OutputHelper.WriteLine("Section 7.7.1"); - Assert.True(Arith_TestClass_mult0074.testMethod()); + Assert.IsTrue(Arith_TestClass_mult0074.testMethod()); } [TestMethod] public void Arith_div0001_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0001.testMethod()); + Assert.IsTrue(Arith_TestClass_div0001.testMethod()); } [TestMethod] public void Arith_div0002_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0002.testMethod()); + Assert.IsTrue(Arith_TestClass_div0002.testMethod()); } [TestMethod] public void Arith_div0008_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0008.testMethod()); + Assert.IsTrue(Arith_TestClass_div0008.testMethod()); } [TestMethod] public void Arith_div0009_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0009.testMethod()); + Assert.IsTrue(Arith_TestClass_div0009.testMethod()); } [TestMethod] public void Arith_div0015_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0015.testMethod()); + Assert.IsTrue(Arith_TestClass_div0015.testMethod()); } [TestMethod] public void Arith_div0016_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0016.testMethod()); + Assert.IsTrue(Arith_TestClass_div0016.testMethod()); } [TestMethod] public void Arith_div0022_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0022.testMethod()); + Assert.IsTrue(Arith_TestClass_div0022.testMethod()); } [TestMethod] public void Arith_div0023_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0023.testMethod()); + Assert.IsTrue(Arith_TestClass_div0023.testMethod()); } [TestMethod] public void Arith_div0050_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0050.testMethod()); + Assert.IsTrue(Arith_TestClass_div0050.testMethod()); } [TestMethod] public void Arith_div0051_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0051.testMethod()); + Assert.IsTrue(Arith_TestClass_div0051.testMethod()); } [TestMethod] public void Arith_div0057_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0057.testMethod()); + Assert.IsTrue(Arith_TestClass_div0057.testMethod()); } [TestMethod] public void Arith_div0058_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0058.testMethod()); + Assert.IsTrue(Arith_TestClass_div0058.testMethod()); } [TestMethod] public void Arith_div0064_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0064.testMethod()); + Assert.IsTrue(Arith_TestClass_div0064.testMethod()); } [TestMethod] public void Arith_div0065_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0065.testMethod()); + Assert.IsTrue(Arith_TestClass_div0065.testMethod()); } [TestMethod] public void Arith_div0071_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0071.testMethod()); + Assert.IsTrue(Arith_TestClass_div0071.testMethod()); } [TestMethod] public void Arith_div0072_Test() { OutputHelper.WriteLine("Section 7.7.2"); - Assert.True(Arith_TestClass_div0072.testMethod()); + Assert.IsTrue(Arith_TestClass_div0072.testMethod()); } [TestMethod] public void Arith_rem0001_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0001.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0001.testMethod()); } [TestMethod] public void Arith_rem0002_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0002.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0002.testMethod()); } [TestMethod] public void Arith_rem0008_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0008.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0008.testMethod()); } [TestMethod] public void Arith_rem0009_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0009.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0009.testMethod()); } [TestMethod] public void Arith_rem0015_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0015.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0015.testMethod()); } [TestMethod] public void Arith_rem0016_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0016.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0016.testMethod()); } [TestMethod] public void Arith_rem0022_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0022.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0022.testMethod()); } [TestMethod] public void Arith_rem0023_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0023.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0023.testMethod()); } [TestMethod] public void Arith_rem0050_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0050.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0050.testMethod()); } [TestMethod] public void Arith_rem0051_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0051.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0051.testMethod()); } [TestMethod] public void Arith_rem0057_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0057.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0057.testMethod()); } [TestMethod] public void Arith_rem0058_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0058.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0058.testMethod()); } [TestMethod] public void Arith_rem0064_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0064.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0064.testMethod()); } [TestMethod] public void Arith_rem0065_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0065.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0065.testMethod()); } [TestMethod] public void Arith_rem0071_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0071.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0071.testMethod()); } [TestMethod] public void Arith_rem0072_Test() { OutputHelper.WriteLine("Section 7.7.3"); - Assert.True(Arith_TestClass_rem0072.testMethod()); + Assert.IsTrue(Arith_TestClass_rem0072.testMethod()); } [TestMethod] public void Arith_add0001_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0001.testMethod()); + Assert.IsTrue(Arith_TestClass_add0001.testMethod()); } [TestMethod] public void Arith_add0002_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0002.testMethod()); + Assert.IsTrue(Arith_TestClass_add0002.testMethod()); } [TestMethod] public void Arith_add0003_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0003.testMethod()); + Assert.IsTrue(Arith_TestClass_add0003.testMethod()); } [TestMethod] public void Arith_add0007_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0007.testMethod()); + Assert.IsTrue(Arith_TestClass_add0007.testMethod()); } [TestMethod] public void Arith_add0008_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0008.testMethod()); + Assert.IsTrue(Arith_TestClass_add0008.testMethod()); } [TestMethod] public void Arith_add0009_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0009.testMethod()); + Assert.IsTrue(Arith_TestClass_add0009.testMethod()); } [TestMethod] public void Arith_add0013_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0013.testMethod()); + Assert.IsTrue(Arith_TestClass_add0013.testMethod()); } [TestMethod] public void Arith_add0014_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0014.testMethod()); + Assert.IsTrue(Arith_TestClass_add0014.testMethod()); } [TestMethod] public void Arith_add0015_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0015.testMethod()); + Assert.IsTrue(Arith_TestClass_add0015.testMethod()); } [TestMethod] public void Arith_add0037_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0037.testMethod()); + Assert.IsTrue(Arith_TestClass_add0037.testMethod()); } [TestMethod] public void Arith_add0038_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0038.testMethod()); + Assert.IsTrue(Arith_TestClass_add0038.testMethod()); } [TestMethod] public void Arith_add0039_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0039.testMethod()); + Assert.IsTrue(Arith_TestClass_add0039.testMethod()); } [TestMethod] public void Arith_add0043_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0043.testMethod()); + Assert.IsTrue(Arith_TestClass_add0043.testMethod()); } [TestMethod] public void Arith_add0044_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0044.testMethod()); + Assert.IsTrue(Arith_TestClass_add0044.testMethod()); } [TestMethod] public void Arith_add0045_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0045.testMethod()); + Assert.IsTrue(Arith_TestClass_add0045.testMethod()); } [TestMethod] public void Arith_add0049_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0049.testMethod()); + Assert.IsTrue(Arith_TestClass_add0049.testMethod()); } [TestMethod] public void Arith_add0050_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0050.testMethod()); + Assert.IsTrue(Arith_TestClass_add0050.testMethod()); } [TestMethod] public void Arith_add0051_Test() { OutputHelper.WriteLine("Section 7.7.4"); - Assert.True(Arith_TestClass_add0051.testMethod()); + Assert.IsTrue(Arith_TestClass_add0051.testMethod()); } [TestMethod] public void Arith_sub0001_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0001.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0001.testMethod()); } [TestMethod] public void Arith_sub0002_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0002.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0002.testMethod()); } [TestMethod] public void Arith_sub0003_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0003.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0003.testMethod()); } [TestMethod] public void Arith_sub0007_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0007.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0007.testMethod()); } [TestMethod] public void Arith_sub0008_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0008.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0008.testMethod()); } [TestMethod] public void Arith_sub0009_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0009.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0009.testMethod()); } [TestMethod] public void Arith_sub0013_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0013.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0013.testMethod()); } [TestMethod] public void Arith_sub0014_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0014.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0014.testMethod()); } [TestMethod] public void Arith_sub0015_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0015.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0015.testMethod()); } [TestMethod] public void Arith_sub0037_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0037.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0037.testMethod()); } [TestMethod] public void Arith_sub0038_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0038.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0038.testMethod()); } [TestMethod] public void Arith_sub0039_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0039.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0039.testMethod()); } [TestMethod] public void Arith_sub0043_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0043.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0043.testMethod()); } [TestMethod] public void Arith_sub0044_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0044.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0044.testMethod()); } [TestMethod] public void Arith_sub0045_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0045.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0045.testMethod()); } [TestMethod] public void Arith_sub0049_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0049.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0049.testMethod()); } [TestMethod] public void Arith_sub0050_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0050.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0050.testMethod()); } [TestMethod] public void Arith_sub0051_Test() { OutputHelper.WriteLine("Section 7.7.5"); - Assert.True(Arith_TestClass_sub0051.testMethod()); + Assert.IsTrue(Arith_TestClass_sub0051.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs b/Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs index 793f6419..caf2ac18 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs @@ -20,7 +20,7 @@ public void Exp_ident001_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); OutputHelper.WriteLine("is within a block, and the block contains a local variable or parameter with the "); OutputHelper.WriteLine("given name, then the primary-expression refers to that local variable."); - Assert.True(ident001.testMethod()); + Assert.IsTrue(ident001.testMethod()); } [TestMethod] public void Exp_ident002_Test() @@ -29,7 +29,7 @@ public void Exp_ident002_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); OutputHelper.WriteLine("is within a block, and the block contains a local variable or parameter with the "); OutputHelper.WriteLine("given name, then the primary-expression refers to that local variable."); - Assert.True(ident002.testMethod()); + Assert.IsTrue(ident002.testMethod()); } [TestMethod] public void Exp_ident003_Test() @@ -38,7 +38,7 @@ public void Exp_ident003_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); OutputHelper.WriteLine("is within a block, and the block contains a local variable or parameter with the "); OutputHelper.WriteLine("given name, then the primary-expression refers to that local variable."); - Assert.True(ident003.testMethod()); + Assert.IsTrue(ident003.testMethod()); } [TestMethod] public void Exp_ident004_Test() @@ -47,7 +47,7 @@ public void Exp_ident004_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); OutputHelper.WriteLine("is within a block, and the block contains a local variable or parameter with the "); OutputHelper.WriteLine("given name, then the primary-expression refers to that local variable."); - Assert.True(ident004.testMethod()); + Assert.IsTrue(ident004.testMethod()); } [TestMethod] public void Exp_ident007_Test() @@ -57,7 +57,7 @@ public void Exp_ident007_Test() OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); OutputHelper.WriteLine("and the name identifies one or more accessible methods of the immediately enclosing"); OutputHelper.WriteLine("class, then the primary expression refers to that method."); - Assert.True(ident007.testMethod()); + Assert.IsTrue(ident007.testMethod()); } [TestMethod] public void Exp_ident008_Test() @@ -67,7 +67,7 @@ public void Exp_ident008_Test() OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); OutputHelper.WriteLine("and the name identifies one or more accessible methods of the immediately enclosing"); OutputHelper.WriteLine("class, then the primary expression refers to that method."); - Assert.True(ident008.testMethod()); + Assert.IsTrue(ident008.testMethod()); } [TestMethod] public void Exp_ident009_Test() @@ -77,7 +77,7 @@ public void Exp_ident009_Test() OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); OutputHelper.WriteLine("and the name identifies one or more accessible methods of the immediately enclosing"); OutputHelper.WriteLine("class, then the primary expression refers to that method."); - Assert.True(ident009.testMethod()); + Assert.IsTrue(ident009.testMethod()); } [TestMethod] public void Exp_ident010_Test() @@ -87,7 +87,7 @@ public void Exp_ident010_Test() OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); OutputHelper.WriteLine("and the name identifies one or more accessible methods of the immediately enclosing"); OutputHelper.WriteLine("class, then the primary expression refers to that method."); - Assert.True(ident010.testMethod()); + Assert.IsTrue(ident010.testMethod()); } [TestMethod] public void Exp_ident011_Test() @@ -97,7 +97,7 @@ public void Exp_ident011_Test() OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); OutputHelper.WriteLine("and the name identifies an accessible, non-static field or property of the immediately"); OutputHelper.WriteLine("enclosing class, then the primary expression refers to that field or property."); - Assert.True(ident011.testMethod()); + Assert.IsTrue(ident011.testMethod()); } [TestMethod] public void Exp_ident012_Test() @@ -107,7 +107,7 @@ public void Exp_ident012_Test() OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); OutputHelper.WriteLine("and the name identifies an accessible, non-static field or property of the immediately"); OutputHelper.WriteLine("enclosing class, then the primary expression refers to that field or property."); - Assert.True(ident012.testMethod()); + Assert.IsTrue(ident012.testMethod()); } [TestMethod] public void Exp_ident013_Test() @@ -117,7 +117,7 @@ public void Exp_ident013_Test() OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); OutputHelper.WriteLine("and the name identifies an accessible, non-static field or property of the immediately"); OutputHelper.WriteLine("enclosing class, then the primary expression refers to that field or property."); - Assert.True(ident013.testMethod()); + Assert.IsTrue(ident013.testMethod()); } [TestMethod] public void Exp_ident014_Test() @@ -129,7 +129,7 @@ public void Exp_ident014_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident014.testMethod()); + Assert.IsTrue(ident014.testMethod()); } [TestMethod] public void Exp_ident015_Test() @@ -141,7 +141,7 @@ public void Exp_ident015_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident015.testMethod()); + Assert.IsTrue(ident015.testMethod()); } [TestMethod] public void Exp_ident016_Test() @@ -153,7 +153,7 @@ public void Exp_ident016_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident016.testMethod()); + Assert.IsTrue(ident016.testMethod()); } [TestMethod] public void Exp_ident017_Test() @@ -165,7 +165,7 @@ public void Exp_ident017_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident017.testMethod()); + Assert.IsTrue(ident017.testMethod()); } [TestMethod] public void Exp_ident018_Test() @@ -177,7 +177,7 @@ public void Exp_ident018_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident018.testMethod()); + Assert.IsTrue(ident018.testMethod()); } [TestMethod] public void Exp_ident019_Test() @@ -189,7 +189,7 @@ public void Exp_ident019_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident019_Top.ident019.testMethod()); + Assert.IsTrue(ident019_Top.ident019.testMethod()); } [TestMethod] public void Exp_ident020_Test() @@ -201,7 +201,7 @@ public void Exp_ident020_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident020_Top.ident020.testMethod()); + Assert.IsTrue(ident020_Top.ident020.testMethod()); } [TestMethod] public void Exp_ident021_Test() @@ -213,7 +213,7 @@ public void Exp_ident021_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident021_Top.ident021.testMethod()); + Assert.IsTrue(ident021_Top.ident021.testMethod()); } [TestMethod] public void Exp_ident022_Test() @@ -225,7 +225,7 @@ public void Exp_ident022_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident022_Top.ident022.testMethod()); + Assert.IsTrue(ident022_Top.ident022.testMethod()); } [TestMethod] public void Exp_ident023_Test() @@ -237,7 +237,7 @@ public void Exp_ident023_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident023_Top.ident023.testMethod()); + Assert.IsTrue(ident023_Top.ident023.testMethod()); } [TestMethod] public void Exp_ident024_Test() @@ -249,7 +249,7 @@ public void Exp_ident024_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident024_Top.ident024.testMethod()); + Assert.IsTrue(ident024_Top.ident024.testMethod()); } [TestMethod] public void Exp_ident025_Test() @@ -261,7 +261,7 @@ public void Exp_ident025_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident025_Top.ident025_Next.ident025.testMethod()); + Assert.IsTrue(ident025_Top.ident025_Next.ident025.testMethod()); } [TestMethod] public void Exp_ident026_Test() @@ -273,7 +273,7 @@ public void Exp_ident026_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident026_Top.ident026_Next.ident026.testMethod()); + Assert.IsTrue(ident026_Top.ident026_Next.ident026.testMethod()); } [TestMethod] public void Exp_ident027_Test() @@ -285,7 +285,7 @@ public void Exp_ident027_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident027_Top.ident027_Next.ident027.testMethod()); + Assert.IsTrue(ident027_Top.ident027_Next.ident027.testMethod()); } [TestMethod] public void Exp_ident028_Test() @@ -297,7 +297,7 @@ public void Exp_ident028_Test() OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); OutputHelper.WriteLine("E is the primary expression."); - Assert.True(ident028_Top.ident028_Next.ident028.testMethod()); + Assert.IsTrue(ident028_Top.ident028_Next.ident028.testMethod()); } [TestMethod] public void Exp_ident029_Test() @@ -306,7 +306,7 @@ public void Exp_ident029_Test() OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to a member in an enclosing namespace, then the primary expression is evaluated "); OutputHelper.WriteLine("to that member and classified as a namespace or a type."); - Assert.True(ident029.testMethod()); + Assert.IsTrue(ident029.testMethod()); } [TestMethod] public void Exp_ident030_Test() @@ -315,7 +315,7 @@ public void Exp_ident030_Test() OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to a member in an enclosing namespace, then the primary expression is evaluated "); OutputHelper.WriteLine("to that member and classified as a namespace or a type."); - Assert.True(ident030.testMethod()); + Assert.IsTrue(ident030.testMethod()); } [TestMethod] @@ -325,7 +325,7 @@ public void Exp_ident031_Test() OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to a member in an enclosing namespace, then the primary expression is evaluated "); OutputHelper.WriteLine("to that member and classified as a namespace or a type."); - Assert.True(NS_ident031_I.ident031.testMethod()) ; + Assert.IsTrue(NS_ident031_I.ident031.testMethod()) ; } [TestMethod] public void Exp_ident032_Test() @@ -333,7 +333,7 @@ public void Exp_ident032_Test() OutputHelper.WriteLine("Section 7.2.2 "); OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); - Assert.True(NS_ident032_I.ident032.testMethod()) ; + Assert.IsTrue(NS_ident032_I.ident032.testMethod()) ; } [TestMethod] public void Exp_ident033_Test() @@ -341,7 +341,7 @@ public void Exp_ident033_Test() OutputHelper.WriteLine("Section 7.2.2 "); OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); - Assert.True(NS_ident033_O.NS_ident033_I.ident033.testMethod()) ; + Assert.IsTrue(NS_ident033_O.NS_ident033_I.ident033.testMethod()) ; } [TestMethod] public void Exp_ident034_Test() @@ -350,7 +350,7 @@ public void Exp_ident034_Test() OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to a single type in an imported namespace, then the primary expression refers to that "); OutputHelper.WriteLine("type."); - Assert.True(NS_ident034_I.ident034.testMethod()) ; + Assert.IsTrue(NS_ident034_I.ident034.testMethod()) ; } [TestMethod] public void Exp_ident035_Test() @@ -359,7 +359,7 @@ public void Exp_ident035_Test() OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to a single type in an imported namespace, then the primary expression refers to that "); OutputHelper.WriteLine("type."); - Assert.True(NS_ident035_O.NS_ident035_I.ident035.testMethod()) ; + Assert.IsTrue(NS_ident035_O.NS_ident035_I.ident035.testMethod()) ; } [TestMethod] public void Exp_ident038_Test() @@ -367,7 +367,7 @@ public void Exp_ident038_Test() OutputHelper.WriteLine("Section 7.2.2 "); OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); - Assert.True(NS_ident038_I.ident038.testMethod()) ; + Assert.IsTrue(NS_ident038_I.ident038.testMethod()) ; } [TestMethod] public void Exp_ident039_Test() @@ -375,7 +375,7 @@ public void Exp_ident039_Test() OutputHelper.WriteLine("Section 7.2.2 "); OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); - Assert.True(NS_ident039_O.NS_ident039_I.ident039.testMethod()) ; + Assert.IsTrue(NS_ident039_O.NS_ident039_I.ident039.testMethod()) ; } [TestMethod] @@ -384,7 +384,7 @@ public void Exp_ident040_Test() OutputHelper.WriteLine("Section 7.2.2 "); OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); - Assert.True(NS_ident040_I.ident040.testMethod()) ; + Assert.IsTrue(NS_ident040_I.ident040.testMethod()) ; } [TestMethod] @@ -394,7 +394,7 @@ public void Exp_mem001_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a namespace and I is the name of an accessible member of that namespace, then the "); OutputHelper.WriteLine("result is the member, either a namespace or a type."); - Assert.True(mem001.testMethod()) ; + Assert.IsTrue(mem001.testMethod()) ; } /* [TestMethod] @@ -404,7 +404,7 @@ public void Exp_mem002_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a namespace and I is the name of an accessible member of that namespace, then the "); OutputHelper.WriteLine("result is the member, either a namespace or a type."); - Assert.True(mem002.testMethod()) + Assert.IsTrue(mem002.testMethod()) { return MFTestResults.Pass; } @@ -417,7 +417,7 @@ public void Exp_mem003_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is also a type, then the result of the member is that type."); - Assert.True(mem003.testMethod()) ; + Assert.IsTrue(mem003.testMethod()) ; } [TestMethod] public void Exp_mem004_Test() @@ -425,7 +425,7 @@ public void Exp_mem004_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is also a type, then the result of the member is that type."); - Assert.True(mem004.testMethod()) ; + Assert.IsTrue(mem004.testMethod()) ; } [TestMethod] public void Exp_mem005_Test() @@ -433,7 +433,7 @@ public void Exp_mem005_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I identifies one or more methods, then the result is a method group."); - Assert.True(mem005.testMethod()); + Assert.IsTrue(mem005.testMethod()); } [TestMethod] public void Exp_mem006_Test() @@ -441,7 +441,7 @@ public void Exp_mem006_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I identifies one or more methods, then the result is a method group."); - Assert.True(mem006.testMethod()); + Assert.IsTrue(mem006.testMethod()); } [TestMethod] public void Exp_mem007_Test() @@ -449,7 +449,7 @@ public void Exp_mem007_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I identifies one or more methods, then the result is a method group."); - Assert.True(mem007.testMethod()); + Assert.IsTrue(mem007.testMethod()); } [TestMethod] public void Exp_mem008_Test() @@ -457,7 +457,7 @@ public void Exp_mem008_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I identifies one or more methods, then the result is a method group."); - Assert.True(mem008.testMethod()); + Assert.IsTrue(mem008.testMethod()); } [TestMethod] public void Exp_mem011_Test() @@ -465,7 +465,7 @@ public void Exp_mem011_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is a static property, then the result is that static property."); - Assert.True(mem011.testMethod()); + Assert.IsTrue(mem011.testMethod()); } [TestMethod] public void Exp_mem012_Test() @@ -473,7 +473,7 @@ public void Exp_mem012_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is a static property, then the result is that static property."); - Assert.True(mem012.testMethod()); + Assert.IsTrue(mem012.testMethod()); } [TestMethod] public void Exp_mem013_Test() @@ -482,7 +482,7 @@ public void Exp_mem013_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is a static read only field, then the result is a value of the "); OutputHelper.WriteLine("static field I."); - Assert.True(mem013.testMethod()); + Assert.IsTrue(mem013.testMethod()); } [TestMethod] public void Exp_mem014_Test() @@ -491,7 +491,7 @@ public void Exp_mem014_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is a static read only field, then the result is a value of the "); OutputHelper.WriteLine("static field I."); - Assert.True(mem014.testMethod()); + Assert.IsTrue(mem014.testMethod()); } [TestMethod] public void Exp_mem015_Test() @@ -499,7 +499,7 @@ public void Exp_mem015_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is a static field, then the result is the static field I."); - Assert.True(mem015.testMethod()); + Assert.IsTrue(mem015.testMethod()); } [TestMethod] public void Exp_mem016_Test() @@ -507,7 +507,7 @@ public void Exp_mem016_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is a static field, then the result is the static field I."); - Assert.True(mem016.testMethod()); + Assert.IsTrue(mem016.testMethod()); } [TestMethod] public void Exp_mem017_Test() @@ -515,7 +515,7 @@ public void Exp_mem017_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is a constant, then the result is the value of that constant."); - Assert.True(mem017.testMethod()); + Assert.IsTrue(mem017.testMethod()); } [TestMethod] public void Exp_mem018_Test() @@ -523,7 +523,7 @@ public void Exp_mem018_Test() OutputHelper.WriteLine("Section 7.2.7 "); OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I is a constant, then the result is the value of that constant."); - Assert.True(mem018.testMethod()); + Assert.IsTrue(mem018.testMethod()); } [TestMethod] public void Exp_mem019_Test() @@ -532,7 +532,7 @@ public void Exp_mem019_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a type and I identifies an enumeration member, then the result is the value of"); OutputHelper.WriteLine("that enumeration member."); - Assert.True(mem019.testMethod()); + Assert.IsTrue(mem019.testMethod()); } [TestMethod] public void Exp_mem021_Test() @@ -541,7 +541,7 @@ public void Exp_mem021_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); OutputHelper.WriteLine("more method groups, then the result is the method group."); - Assert.True(mem021.testMethod()); + Assert.IsTrue(mem021.testMethod()); } [TestMethod] public void Exp_mem022_Test() @@ -550,7 +550,7 @@ public void Exp_mem022_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); OutputHelper.WriteLine("more method groups, then the result is the method group."); - Assert.True(mem022.testMethod()); + Assert.IsTrue(mem022.testMethod()); } [TestMethod] public void Exp_mem023_Test() @@ -559,7 +559,7 @@ public void Exp_mem023_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); OutputHelper.WriteLine("more method groups, then the result is the method group."); - Assert.True(mem023.testMethod()); + Assert.IsTrue(mem023.testMethod()); } [TestMethod] public void Exp_mem025_Test() @@ -568,7 +568,7 @@ public void Exp_mem025_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); OutputHelper.WriteLine("more method groups, then the result is the method group."); - Assert.True(mem025.testMethod()); + Assert.IsTrue(mem025.testMethod()); } [TestMethod] public void Exp_mem026_Test() @@ -577,7 +577,7 @@ public void Exp_mem026_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); OutputHelper.WriteLine("more method groups, then the result is the method group."); - Assert.True(mem026.testMethod()); + Assert.IsTrue(mem026.testMethod()); } [TestMethod] public void Exp_mem027_Test() @@ -586,7 +586,7 @@ public void Exp_mem027_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); OutputHelper.WriteLine("instance property, then the result is that instance property."); - Assert.True(mem027.testMethod()); + Assert.IsTrue(mem027.testMethod()); } [TestMethod] public void Exp_mem028_Test() @@ -595,7 +595,7 @@ public void Exp_mem028_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); OutputHelper.WriteLine("instance property, then the result is that instance property."); - Assert.True(mem028.testMethod()); + Assert.IsTrue(mem028.testMethod()); } [TestMethod] public void Exp_mem029_Test() @@ -604,7 +604,7 @@ public void Exp_mem029_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); OutputHelper.WriteLine("instance property, then the result is that instance property."); - Assert.True(mem029.testMethod()); + Assert.IsTrue(mem029.testMethod()); } [TestMethod] public void Exp_mem031_Test() @@ -613,7 +613,7 @@ public void Exp_mem031_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); OutputHelper.WriteLine("instance property, then the result is that instance property."); - Assert.True(mem031.testMethod()); + Assert.IsTrue(mem031.testMethod()); } [TestMethod] public void Exp_mem032_Test() @@ -622,7 +622,7 @@ public void Exp_mem032_Test() OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); OutputHelper.WriteLine("instance property, then the result is that instance property."); - Assert.True(mem032.testMethod()); + Assert.IsTrue(mem032.testMethod()); } [TestMethod] public void Exp_mem034_Test() @@ -632,7 +632,7 @@ public void Exp_mem034_Test() OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field, then if the value of E is null, a System.Exception is "); OutputHelper.WriteLine("thrown."); - Assert.True(mem034.testMethod()); + Assert.IsTrue(mem034.testMethod()); } [TestMethod] public void Exp_mem035_Test() @@ -642,7 +642,7 @@ public void Exp_mem035_Test() OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field, then if the value of E is null, a System.Exception is "); OutputHelper.WriteLine("thrown."); - Assert.True(mem035.testMethod()); + Assert.IsTrue(mem035.testMethod()); } [TestMethod] public void Exp_mem036_Test() @@ -652,7 +652,7 @@ public void Exp_mem036_Test() OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); OutputHelper.WriteLine("of the field I."); - Assert.True(mem036.testMethod()); + Assert.IsTrue(mem036.testMethod()); } [TestMethod] public void Exp_mem038_Test() @@ -662,7 +662,7 @@ public void Exp_mem038_Test() OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); OutputHelper.WriteLine("of the field I."); - Assert.True(mem038.testMethod()); + Assert.IsTrue(mem038.testMethod()); } [TestMethod] public void Exp_mem040_Test() @@ -672,7 +672,7 @@ public void Exp_mem040_Test() OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); OutputHelper.WriteLine("of the field I."); - Assert.True(mem040.testMethod()); + Assert.IsTrue(mem040.testMethod()); } [TestMethod] public void Exp_mem042_Test() @@ -681,7 +681,7 @@ public void Exp_mem042_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem042.testMethod()); + Assert.IsTrue(mem042.testMethod()); } [TestMethod] public void Exp_mem043_Test() @@ -690,7 +690,7 @@ public void Exp_mem043_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem043.testMethod()); + Assert.IsTrue(mem043.testMethod()); } [TestMethod] public void Exp_mem044_Test() @@ -699,7 +699,7 @@ public void Exp_mem044_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem044.testMethod()); + Assert.IsTrue(mem044.testMethod()); } [TestMethod] public void Exp_mem045_Test() @@ -708,7 +708,7 @@ public void Exp_mem045_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem045.testMethod()); + Assert.IsTrue(mem045.testMethod()); } [TestMethod] public void Exp_mem046_Test() @@ -717,7 +717,7 @@ public void Exp_mem046_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem046.testMethod()); + Assert.IsTrue(mem046.testMethod()); } [TestMethod] public void Exp_mem047_Test() @@ -726,7 +726,7 @@ public void Exp_mem047_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem047.testMethod()); + Assert.IsTrue(mem047.testMethod()); } [TestMethod] public void Exp_mem048_Test() @@ -736,7 +736,7 @@ public void Exp_mem048_Test() OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); OutputHelper.WriteLine("of the field I."); - Assert.True(mem048.testMethod()); + Assert.IsTrue(mem048.testMethod()); } [TestMethod] public void Exp_mem050_Test() @@ -746,7 +746,7 @@ public void Exp_mem050_Test() OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); OutputHelper.WriteLine("of the field I."); - Assert.True(mem050.testMethod()); + Assert.IsTrue(mem050.testMethod()); } [TestMethod] public void Exp_mem052_Test() @@ -756,7 +756,7 @@ public void Exp_mem052_Test() OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); OutputHelper.WriteLine("of the field I."); - Assert.True(mem052.testMethod()); + Assert.IsTrue(mem052.testMethod()); } [TestMethod] public void Exp_mem054_Test() @@ -765,7 +765,7 @@ public void Exp_mem054_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem054.testMethod()); + Assert.IsTrue(mem054.testMethod()); } [TestMethod] public void Exp_mem055_Test() @@ -774,7 +774,7 @@ public void Exp_mem055_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem055.testMethod()); + Assert.IsTrue(mem055.testMethod()); } [TestMethod] public void Exp_mem056_Test() @@ -783,7 +783,7 @@ public void Exp_mem056_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem056.testMethod()); + Assert.IsTrue(mem056.testMethod()); } [TestMethod] public void Exp_mem058_Test() @@ -792,70 +792,70 @@ public void Exp_mem058_Test() OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); OutputHelper.WriteLine("an instance field of class type T."); - Assert.True(mem058.testMethod()); + Assert.IsTrue(mem058.testMethod()); } [TestMethod] public void Exp_lit001_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("This code tests that a boolean-literal is of type bool."); - Assert.True(lit001.testMethod()) ; + Assert.IsTrue(lit001.testMethod()) ; } [TestMethod] public void Exp_lit004_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("This code tests that an int-literal is of type int."); - Assert.True(lit004.testMethod()) ; + Assert.IsTrue(lit004.testMethod()) ; } [TestMethod] public void Exp_lit005_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("This code tests that a long-literal is of type long."); - Assert.True(lit005.testMethod()) ; + Assert.IsTrue(lit005.testMethod()) ; } [TestMethod] public void Exp_lit006_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("This code tests that a float-literal is of type float."); - Assert.True(lit006.testMethod()) ; + Assert.IsTrue(lit006.testMethod()) ; } [TestMethod] public void Exp_lit007_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("This code tests that a double-literal is of type double."); - Assert.True(lit007.testMethod()) ; + Assert.IsTrue(lit007.testMethod()) ; } [TestMethod] public void Exp_lit008_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("This code tests that a double-literal is of type double."); - Assert.True(lit008.testMethod()); + Assert.IsTrue(lit008.testMethod()); } [TestMethod] public void Exp_lit009_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("This code tests that a character-literal is of type char."); - Assert.True(lit009.testMethod()); + Assert.IsTrue(lit009.testMethod()); } [TestMethod] public void Exp_lit010_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("This code tests that a string-literal is of type string."); - Assert.True(lit010.testMethod()); + Assert.IsTrue(lit010.testMethod()); } [TestMethod] public void Exp_lit011_Test() { OutputHelper.WriteLine("Section 7.2.1 "); OutputHelper.WriteLine("string compare with with its base type."); - Assert.True(lit011.testMethod()); + Assert.IsTrue(lit011.testMethod()); } [TestMethod] public void Exp_base006_Test() @@ -863,7 +863,7 @@ public void Exp_base006_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base006.testMethod()) ; + Assert.IsTrue(base006.testMethod()) ; } [TestMethod] public void Exp_base007_Test() @@ -871,7 +871,7 @@ public void Exp_base007_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base007.testMethod()) ; + Assert.IsTrue(base007.testMethod()) ; } [TestMethod] public void Exp_base009_Test() @@ -879,7 +879,7 @@ public void Exp_base009_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base009.testMethod()) ; + Assert.IsTrue(base009.testMethod()) ; } [TestMethod] public void Exp_base010_Test() @@ -887,7 +887,7 @@ public void Exp_base010_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base010.testMethod()) ; + Assert.IsTrue(base010.testMethod()) ; } [TestMethod] public void Exp_base011_Test() @@ -895,7 +895,7 @@ public void Exp_base011_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base011.testMethod()); + Assert.IsTrue(base011.testMethod()); } [TestMethod] public void Exp_base012_Test() @@ -903,7 +903,7 @@ public void Exp_base012_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base012.testMethod()); + Assert.IsTrue(base012.testMethod()); } [TestMethod] public void Exp_base013_Test() @@ -911,7 +911,7 @@ public void Exp_base013_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base013.testMethod()); + Assert.IsTrue(base013.testMethod()); } [TestMethod] public void Exp_base014_Test() @@ -919,7 +919,7 @@ public void Exp_base014_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base014.testMethod()); + Assert.IsTrue(base014.testMethod()); } [TestMethod] public void Exp_base015_Test() @@ -927,7 +927,7 @@ public void Exp_base015_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base015.testMethod()); + Assert.IsTrue(base015.testMethod()); } [TestMethod] public void Exp_base016_Test() @@ -935,7 +935,7 @@ public void Exp_base016_Test() OutputHelper.WriteLine("Section 7.2.8 "); OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); - Assert.True(base016.testMethod()); + Assert.IsTrue(base016.testMethod()); } [TestMethod] public void Exp_base017_Test() @@ -944,7 +944,7 @@ public void Exp_base017_Test() OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); OutputHelper.WriteLine("Expected Fail"); - Assert.True(base017.testMethod()); + Assert.IsTrue(base017.testMethod()); } [TestMethod] public void Exp_base018_Test() @@ -953,7 +953,7 @@ public void Exp_base018_Test() OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); OutputHelper.WriteLine("Expected Fail"); - Assert.True(base018.testMethod()); + Assert.IsTrue(base018.testMethod()); } [TestMethod] public void Exp_base019_Test() @@ -962,7 +962,7 @@ public void Exp_base019_Test() OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); OutputHelper.WriteLine("Expected Fail"); - Assert.True(base019.testMethod()); + Assert.IsTrue(base019.testMethod()); } [TestMethod] public void Exp_base020_Test() @@ -971,7 +971,7 @@ public void Exp_base020_Test() OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); OutputHelper.WriteLine("an instance method, or an instance property accessor."); OutputHelper.WriteLine("Expected Fail"); - Assert.True(base020.testMethod()); + Assert.IsTrue(base020.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestArithmetic/UnitTestFormat.cs b/Tests/NFUnitTestArithmetic/UnitTestFormat.cs index 1d030f43..ea41a330 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestFormat.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestFormat.cs @@ -42,7 +42,7 @@ public void StringFormat_00() { // Test a null string in String.Format - should be treated like an empty string. string nullArg = null; - Assert.Equal(string.Format("Value is {0}", nullArg), "Value is ", ""); + Assert.AreEqual(string.Format("Value is {0}", nullArg), "Value is ", ""); } [TestMethod] @@ -50,7 +50,7 @@ public void StringFormat_01() { // catch an exception if the format string is null string nullFormat = null; - Assert.Throws(typeof(NullReferenceException), () => { string.Format(nullFormat, 12345.67); }); + Assert.ThrowsException(typeof(NullReferenceException), () => { string.Format(nullFormat, 12345.67); }); } [TestMethod] @@ -59,7 +59,7 @@ public void StringFormat_01() public void StringFormat_02(string formatString, double value, string outcomeMessage) { // Test alignment operator which is the "," and a number. Negative is right aligned, positive left aligned - Assert.Equal(string.Format(formatString, value), outcomeMessage); + Assert.AreEqual(string.Format(formatString, value), outcomeMessage); } [TestMethod] @@ -73,7 +73,7 @@ public void StringFormat_03(string formatString, double value, string outcomeMes { OutputHelper.WriteLine("formatString is" + formatString); // invalid alignment cases - Assert.Throws(typeof(ArgumentException), () => { string.Format(formatString, value); }, outcomeMessage); + Assert.ThrowsException(typeof(ArgumentException), () => { string.Format(formatString, value); }, outcomeMessage); } [TestMethod] @@ -249,7 +249,7 @@ private void TestFormat(string valueStr, string formatString, string expectedRes TestFormatInner(valueStr, formatString.ToLower(), expectedResult.ToLower(), numType, isNegative); break; default: - Assert.True(false, "Invalid format case used"); + Assert.IsTrue(false, "Invalid format case used"); break; } } @@ -265,7 +265,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(sbyte.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.SByte, rowData); - Assert.True(sbyte.TryParse(valueStr, out sbyte result), $"TryParse failed for sbyte {valueStr}"); + Assert.IsTrue(sbyte.TryParse(valueStr, out sbyte result), $"TryParse failed for sbyte {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.SByte, rowData); } @@ -276,7 +276,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(short.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int16, rowData); - Assert.True(short.TryParse(valueStr, out short result), $"TryParse failed for short {valueStr}"); + Assert.IsTrue(short.TryParse(valueStr, out short result), $"TryParse failed for short {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int16, rowData); } @@ -287,7 +287,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(int.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int32, rowData); - Assert.True(int.TryParse(valueStr, out int result), $"TryParse failed for int {valueStr}"); + Assert.IsTrue(int.TryParse(valueStr, out int result), $"TryParse failed for int {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int32, rowData); } @@ -298,7 +298,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(long.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int64, rowData); - Assert.True(long.TryParse(valueStr, out long result), $"TryParse failed for long {valueStr}"); + Assert.IsTrue(long.TryParse(valueStr, out long result), $"TryParse failed for long {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Int64, rowData); } @@ -309,7 +309,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(byte.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Byte, rowData); - Assert.True(byte.TryParse(valueStr, out byte result), $"TryParse failed for byte {valueStr}"); + Assert.IsTrue(byte.TryParse(valueStr, out byte result), $"TryParse failed for byte {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Byte, rowData); } @@ -320,7 +320,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(ushort.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt16, rowData); - Assert.True(ushort.TryParse(valueStr, out ushort result), $"TryParse failed for ushort {valueStr}"); + Assert.IsTrue(ushort.TryParse(valueStr, out ushort result), $"TryParse failed for ushort {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt16, rowData); } @@ -331,7 +331,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(uint.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt32, rowData); - Assert.True(uint.TryParse(valueStr, out uint result), $"TryParse failed for uint {valueStr}"); + Assert.IsTrue(uint.TryParse(valueStr, out uint result), $"TryParse failed for uint {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt32, rowData); } @@ -342,7 +342,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(ulong.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt64, rowData); - Assert.True(ulong.TryParse(valueStr, out ulong result), $"TryParse failed for ulong {valueStr}"); + Assert.IsTrue(ulong.TryParse(valueStr, out ulong result), $"TryParse failed for ulong {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.UInt64, rowData); } @@ -353,7 +353,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(float.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Single, rowData); - Assert.True(float.TryParse(valueStr, out float result), $"TryParse failed for float {valueStr}"); + Assert.IsTrue(float.TryParse(valueStr, out float result), $"TryParse failed for float {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Single, rowData); } @@ -364,7 +364,7 @@ private void TestFormatInner(string valueStr, string formatString, string expect { CheckValue(double.Parse(valueStr), valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Double, rowData); - Assert.True(double.TryParse(valueStr, out double result), $"TryParse failed for double {valueStr}"); + Assert.IsTrue(double.TryParse(valueStr, out double result), $"TryParse failed for double {valueStr}"); CheckValue(result, valueStr, formatString, expectedResult, SampleDisplay.ColumnType.Double, rowData); } } @@ -380,7 +380,7 @@ private void CheckValue(object value, string valueStr, string formatString, stri } else { - Assert.Equal(result, expectedResult, $"The expected result for '{formatString}' on value {valueStr} for type {value.GetType().Name} is '{expectedResult}'"); + Assert.AreEqual(result, expectedResult, $"The expected result for '{formatString}' on value {valueStr} for type {value.GetType().Name} is '{expectedResult}'"); } rowData.SetResult(result, columnType); } diff --git a/Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs b/Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs index 529bf6e5..b86770fe 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs @@ -17,223 +17,223 @@ class UnitTestOtherArithmeticTests public void Other_unary068_Test() { OutputHelper.WriteLine(" 7.6.5 Operator Overloading - Unary operator"); - Assert.True(Other_TestClass_unary068.testMethod()); + Assert.IsTrue(Other_TestClass_unary068.testMethod()); } [TestMethod] public void Other_relat001_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat001.testMethod()); + Assert.IsTrue(Other_TestClass_relat001.testMethod()); } [TestMethod] public void Other_relat002_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat002.testMethod()); + Assert.IsTrue(Other_TestClass_relat002.testMethod()); } [TestMethod] public void Other_relat003_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat003.testMethod()); + Assert.IsTrue(Other_TestClass_relat003.testMethod()); } [TestMethod] public void Other_relat004_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat004.testMethod()); + Assert.IsTrue(Other_TestClass_relat004.testMethod()); } [TestMethod] public void Other_relat005_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat005.testMethod()); + Assert.IsTrue(Other_TestClass_relat005.testMethod()); } [TestMethod] public void Other_relat006_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat006.testMethod()); + Assert.IsTrue(Other_TestClass_relat006.testMethod()); } [TestMethod] public void Other_relat007_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat007.testMethod()); + Assert.IsTrue(Other_TestClass_relat007.testMethod()); } [TestMethod] public void Other_relat008_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat008.testMethod()); + Assert.IsTrue(Other_TestClass_relat008.testMethod()); } [TestMethod] public void Other_relat009_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat009.testMethod()); + Assert.IsTrue(Other_TestClass_relat009.testMethod()); } [TestMethod] public void Other_relat010_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat010.testMethod()); + Assert.IsTrue(Other_TestClass_relat010.testMethod()); } [TestMethod] public void Other_relat011_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat011.testMethod()); + Assert.IsTrue(Other_TestClass_relat011.testMethod()); } [TestMethod] public void Other_relat012_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat012.testMethod()); + Assert.IsTrue(Other_TestClass_relat012.testMethod()); } [TestMethod] public void Other_relat013_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat013.testMethod()); + Assert.IsTrue(Other_TestClass_relat013.testMethod()); } [TestMethod] public void Other_relat014_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat014.testMethod()); + Assert.IsTrue(Other_TestClass_relat014.testMethod()); } [TestMethod] public void Other_relat015_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat015.testMethod()); + Assert.IsTrue(Other_TestClass_relat015.testMethod()); } [TestMethod] public void Other_relat016_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat016.testMethod()); + Assert.IsTrue(Other_TestClass_relat016.testMethod()); } [TestMethod] public void Other_relat017_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat017.testMethod()); + Assert.IsTrue(Other_TestClass_relat017.testMethod()); } [TestMethod] public void Other_relat018_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat018.testMethod()); + Assert.IsTrue(Other_TestClass_relat018.testMethod()); } [TestMethod] public void Other_relat019_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat019.testMethod()); + Assert.IsTrue(Other_TestClass_relat019.testMethod()); } [TestMethod] public void Other_relat020_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat020.testMethod()); + Assert.IsTrue(Other_TestClass_relat020.testMethod()); } [TestMethod] public void Other_relat021_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat021.testMethod()); + Assert.IsTrue(Other_TestClass_relat021.testMethod()); } [TestMethod] public void Other_relat022_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat022.testMethod()); + Assert.IsTrue(Other_TestClass_relat022.testMethod()); } [TestMethod] public void Other_relat023_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat023.testMethod()); + Assert.IsTrue(Other_TestClass_relat023.testMethod()); } [TestMethod] public void Other_relat024_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat024.testMethod()); + Assert.IsTrue(Other_TestClass_relat024.testMethod()); } [TestMethod] public void Other_relat025_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat025.testMethod()); + Assert.IsTrue(Other_TestClass_relat025.testMethod()); } [TestMethod] public void Other_relat026_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat026.testMethod()); + Assert.IsTrue(Other_TestClass_relat026.testMethod()); } [TestMethod] public void Other_relat027_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat027.testMethod()); + Assert.IsTrue(Other_TestClass_relat027.testMethod()); } [TestMethod] public void Other_relat028_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat028.testMethod()); + Assert.IsTrue(Other_TestClass_relat028.testMethod()); } [TestMethod] public void Other_relat029_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat029.testMethod()); + Assert.IsTrue(Other_TestClass_relat029.testMethod()); } [TestMethod] public void Other_relat030_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat030.testMethod()); + Assert.IsTrue(Other_TestClass_relat030.testMethod()); } [TestMethod] public void Other_relat031_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat031.testMethod()); + Assert.IsTrue(Other_TestClass_relat031.testMethod()); } [TestMethod] public void Other_relat032_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat032.testMethod()); + Assert.IsTrue(Other_TestClass_relat032.testMethod()); } [TestMethod] public void Other_relat033_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat033.testMethod()); + Assert.IsTrue(Other_TestClass_relat033.testMethod()); } [TestMethod] public void Other_relat034_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat034.testMethod()); + Assert.IsTrue(Other_TestClass_relat034.testMethod()); } [TestMethod] public void Other_relat035_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat035.testMethod()); + Assert.IsTrue(Other_TestClass_relat035.testMethod()); } [TestMethod] public void Other_relat036_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat036.testMethod()); + Assert.IsTrue(Other_TestClass_relat036.testMethod()); } @@ -245,7 +245,7 @@ public void Other_relat037_Test() OutputHelper.WriteLine("If either operand is NaN, the result is false"); OutputHelper.WriteLine("for all operators except !=, and true for !="); OutputHelper.WriteLine("operator."); - Assert.True(Other_TestClass_relat037.testMethod()) + Assert.IsTrue(Other_TestClass_relat037.testMethod()) { return MFTestResults.Pass; } @@ -258,7 +258,7 @@ public void Other_relat038_Test() OutputHelper.WriteLine("If either operand is NaN, the result is false"); OutputHelper.WriteLine("for all operators except !=, and true for !="); OutputHelper.WriteLine("operator."); - Assert.True(Other_TestClass_relat038.testMethod()) + Assert.IsTrue(Other_TestClass_relat038.testMethod()) { return MFTestResults.Pass; } @@ -271,7 +271,7 @@ public void Other_relat039_Test() OutputHelper.WriteLine("If either operand is NaN, the result is false"); OutputHelper.WriteLine("for all operators except !=, and true for !="); OutputHelper.WriteLine("operator."); - Assert.True(Other_TestClass_relat039.testMethod()) + Assert.IsTrue(Other_TestClass_relat039.testMethod()) { return MFTestResults.Pass; } @@ -284,7 +284,7 @@ public void Other_relat040_Test() OutputHelper.WriteLine("If either operand is NaN, the result is false"); OutputHelper.WriteLine("for all operators except !=, and true for !="); OutputHelper.WriteLine("operator."); - Assert.True(Other_TestClass_relat040.testMethod()) + Assert.IsTrue(Other_TestClass_relat040.testMethod()) { return MFTestResults.Pass; } @@ -297,7 +297,7 @@ public void Other_relat041_Test() OutputHelper.WriteLine("If either operand is NaN, the result is false"); OutputHelper.WriteLine("for all operators except !=, and true for !="); OutputHelper.WriteLine("operator."); - Assert.True(Other_TestClass_relat041.testMethod()) + Assert.IsTrue(Other_TestClass_relat041.testMethod()) { return MFTestResults.Pass; } @@ -310,7 +310,7 @@ public void Other_relat042_Test() OutputHelper.WriteLine("If either operand is NaN, the result is false"); OutputHelper.WriteLine("for all operators except !=, and true for !="); OutputHelper.WriteLine("operator."); - Assert.True(Other_TestClass_relat042.testMethod()) + Assert.IsTrue(Other_TestClass_relat042.testMethod()) { return MFTestResults.Pass; } @@ -322,7 +322,7 @@ public void Other_relat043_Test() OutputHelper.WriteLine("Section 7.9"); OutputHelper.WriteLine("Negative and positive zero is considered"); OutputHelper.WriteLine("equal."); - Assert.True(Other_TestClass_relat043.testMethod()) + Assert.IsTrue(Other_TestClass_relat043.testMethod()) { return MFTestResults.Pass; } @@ -334,7 +334,7 @@ public void Other_relat044_Test() OutputHelper.WriteLine("Section 7.9"); OutputHelper.WriteLine("Negative and positive zero is considered"); OutputHelper.WriteLine("equal."); - Assert.True(Other_TestClass_relat044.testMethod()) + Assert.IsTrue(Other_TestClass_relat044.testMethod()) { return MFTestResults.Pass; } @@ -347,7 +347,7 @@ public void Other_relat045_Test() OutputHelper.WriteLine("Other_TestClass_?_A negative infinity is considered less than"); OutputHelper.WriteLine("all other values, but equal to another negative"); OutputHelper.WriteLine("infinity."); - Assert.True(Other_TestClass_relat045.testMethod()) + Assert.IsTrue(Other_TestClass_relat045.testMethod()) { return MFTestResults.Pass; } @@ -360,7 +360,7 @@ public void Other_relat046_Test() OutputHelper.WriteLine("Other_TestClass_?_A negative infinity is considered less than"); OutputHelper.WriteLine("all other values, but equal to another negative"); OutputHelper.WriteLine("infinity."); - Assert.True(Other_TestClass_relat046.testMethod()) + Assert.IsTrue(Other_TestClass_relat046.testMethod()) { return MFTestResults.Pass; } @@ -372,7 +372,7 @@ public void Other_relat047_Test() OutputHelper.WriteLine("Section 7.9"); OutputHelper.WriteLine("Other_TestClass_?_A positive infinity is considered greater than all"); OutputHelper.WriteLine("other values, but equal to positive infinity."); - Assert.True(Other_TestClass_relat047.testMethod()) + Assert.IsTrue(Other_TestClass_relat047.testMethod()) { return MFTestResults.Pass; } @@ -384,7 +384,7 @@ public void Other_relat048_Test() OutputHelper.WriteLine("Section 7.9"); OutputHelper.WriteLine("Other_TestClass_?_A positive infinity is considered greater than all"); OutputHelper.WriteLine("other values, but equal to positive infinity."); - Assert.True(Other_TestClass_relat048.testMethod()) + Assert.IsTrue(Other_TestClass_relat048.testMethod()) { return MFTestResults.Pass; } @@ -395,49 +395,49 @@ public void Other_relat048_Test() public void Other_relat055_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat055.testMethod()); + Assert.IsTrue(Other_TestClass_relat055.testMethod()); } [TestMethod] public void Other_relat056_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat056.testMethod()); + Assert.IsTrue(Other_TestClass_relat056.testMethod()); } [TestMethod] public void Other_relat057_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat057.testMethod()); + Assert.IsTrue(Other_TestClass_relat057.testMethod()); } [TestMethod] public void Other_relat058_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat058.testMethod()); + Assert.IsTrue(Other_TestClass_relat058.testMethod()); } [TestMethod] public void Other_relat059_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat059.testMethod()); + Assert.IsTrue(Other_TestClass_relat059.testMethod()); } [TestMethod] public void Other_relat060_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat060.testMethod()); + Assert.IsTrue(Other_TestClass_relat060.testMethod()); } [TestMethod] public void Other_relat061_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat061.testMethod()); + Assert.IsTrue(Other_TestClass_relat061.testMethod()); } [TestMethod] public void Other_relat062_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat062.testMethod()); + Assert.IsTrue(Other_TestClass_relat062.testMethod()); } [TestMethod] public void Other_relat063_Test() @@ -450,7 +450,7 @@ public void Other_relat063_Test() OutputHelper.WriteLine("applicable user-defined equality operators"); OutputHelper.WriteLine("effectively hide the predefined reference type"); OutputHelper.WriteLine("equality operators."); - Assert.True(Other_TestClass_relat063.testMethod()); + Assert.IsTrue(Other_TestClass_relat063.testMethod()); } [TestMethod] public void Other_relat064_Test() @@ -463,7 +463,7 @@ public void Other_relat064_Test() OutputHelper.WriteLine("applicable user-defined equality operators"); OutputHelper.WriteLine("effectively hide the predefined reference type"); OutputHelper.WriteLine("equality operators."); - Assert.True(Other_TestClass_relat064.testMethod()); + Assert.IsTrue(Other_TestClass_relat064.testMethod()); } [TestMethod] public void Other_relat065_Test() @@ -476,7 +476,7 @@ public void Other_relat065_Test() OutputHelper.WriteLine("applicable user-defined equality operators"); OutputHelper.WriteLine("effectively hide the predefined reference type"); OutputHelper.WriteLine("equality operators."); - Assert.True(Other_TestClass_relat065.testMethod()); + Assert.IsTrue(Other_TestClass_relat065.testMethod()); } [TestMethod] public void Other_relat066_Test() @@ -489,7 +489,7 @@ public void Other_relat066_Test() OutputHelper.WriteLine("applicable user-defined equality operators"); OutputHelper.WriteLine("effectively hide the predefined reference type"); OutputHelper.WriteLine("equality operators."); - Assert.True(Other_TestClass_relat066.testMethod()); + Assert.IsTrue(Other_TestClass_relat066.testMethod()); } [TestMethod] public void Other_relat069_Test() @@ -498,7 +498,7 @@ public void Other_relat069_Test() OutputHelper.WriteLine("It is an error to use the predefined reference"); OutputHelper.WriteLine("type equality operators to compare two references"); OutputHelper.WriteLine("that are known to be different at compile-time."); - Assert.True(Other_TestClass_relat069.testMethod()); + Assert.IsTrue(Other_TestClass_relat069.testMethod()); } [TestMethod] public void Other_relat072_Test() @@ -509,7 +509,7 @@ public void Other_relat072_Test() OutputHelper.WriteLine("Therefore, unless a struct type declares its own"); OutputHelper.WriteLine("equality operators, it is not possible to compare"); OutputHelper.WriteLine("values of that struct type."); - Assert.True(Other_TestClass_relat072.testMethod()); + Assert.IsTrue(Other_TestClass_relat072.testMethod()); } [TestMethod] public void Other_relat073_Test() @@ -523,7 +523,7 @@ public void Other_relat073_Test() OutputHelper.WriteLine("possible to select the reference type equality"); OutputHelper.WriteLine("operator by explicitly casting one or both of"); OutputHelper.WriteLine("the operands to type object."); - Assert.True(Other_TestClass_relat073.testMethod()); + Assert.IsTrue(Other_TestClass_relat073.testMethod()); } [TestMethod] public void Other_relat074_Test() @@ -537,38 +537,38 @@ public void Other_relat074_Test() OutputHelper.WriteLine("possible to select the reference type equality"); OutputHelper.WriteLine("operator by explicitly casting one or both of"); OutputHelper.WriteLine("the operands to type object."); - Assert.True(Other_TestClass_relat074.testMethod()); + Assert.IsTrue(Other_TestClass_relat074.testMethod()); } [TestMethod] public void Other_relat075_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat075.testMethod()); + Assert.IsTrue(Other_TestClass_relat075.testMethod()); } [TestMethod] public void Other_relat076_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat076.testMethod()); + Assert.IsTrue(Other_TestClass_relat076.testMethod()); } [TestMethod] public void Other_relat077_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat077.testMethod()); + Assert.IsTrue(Other_TestClass_relat077.testMethod()); } [TestMethod] public void Other_relat078_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat078.testMethod()); + Assert.IsTrue(Other_TestClass_relat078.testMethod()); } /* [TestMethod] public void Other_relat079_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat079.testMethod()) + Assert.IsTrue(Other_TestClass_relat079.testMethod()) { return MFTestResults.Pass; } @@ -579,143 +579,143 @@ public void Other_relat079_Test() public void Other_relat080_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat080.testMethod()); + Assert.IsTrue(Other_TestClass_relat080.testMethod()); } [TestMethod] public void Other_relat081_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat081.testMethod()); + Assert.IsTrue(Other_TestClass_relat081.testMethod()); } [TestMethod] public void Other_relat083_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat083.testMethod()); + Assert.IsTrue(Other_TestClass_relat083.testMethod()); } [TestMethod] public void Other_relat084_Test() { OutputHelper.WriteLine("Section 7.9"); - Assert.True(Other_TestClass_relat084.testMethod()); + Assert.IsTrue(Other_TestClass_relat084.testMethod()); } [TestMethod] public void Other_relat086_Test() { OutputHelper.WriteLine("Making sure floating point relational operators are working correctly for negative"); OutputHelper.WriteLine("vs. positive values."); - Assert.True(Other_TestClass_relat086.testMethod()); + Assert.IsTrue(Other_TestClass_relat086.testMethod()); } [TestMethod] public void Other_relat087_Test() { OutputHelper.WriteLine("Making sure floating point relational operators are working correctly for negative"); OutputHelper.WriteLine("vs. positive values."); - Assert.True(Other_TestClass_relat087.testMethod()); + Assert.IsTrue(Other_TestClass_relat087.testMethod()); } [TestMethod] public void Other_relat088_Test() { OutputHelper.WriteLine("Making sure floating point relational operators are working correctly for negative"); OutputHelper.WriteLine("vs. positive values."); - Assert.True(Other_TestClass_relat088.testMethod()); + Assert.IsTrue(Other_TestClass_relat088.testMethod()); } [TestMethod] public void Other_relat089_Test() { OutputHelper.WriteLine("Making sure floating point relational operators are working correctly for negative"); OutputHelper.WriteLine("vs. positive values."); - Assert.True(Other_TestClass_relat089.testMethod()); + Assert.IsTrue(Other_TestClass_relat089.testMethod()); } [TestMethod] public void Other_operators_logic001_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic001.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic001.testMethod()); } [TestMethod] public void Other_operators_logic002_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic002.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic002.testMethod()); } [TestMethod] public void Other_operators_logic003_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic003.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic003.testMethod()); } [TestMethod] public void Other_operators_logic004_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic004.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic004.testMethod()); } [TestMethod] public void Other_operators_logic005_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic005.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic005.testMethod()); } [TestMethod] public void Other_operators_logic006_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic006.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic006.testMethod()); } [TestMethod] public void Other_operators_logic007_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic007.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic007.testMethod()); } [TestMethod] public void Other_operators_logic008_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic008.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic008.testMethod()); } [TestMethod] public void Other_operators_logic009_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic009.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic009.testMethod()); } [TestMethod] public void Other_operators_logic010_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic010.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic010.testMethod()); } [TestMethod] public void Other_operators_logic011_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic011.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic011.testMethod()); } [TestMethod] public void Other_operators_logic012_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic012.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic012.testMethod()); } [TestMethod] public void Other_operators_logic013_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic013.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic013.testMethod()); } [TestMethod] public void Other_operators_logic014_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic014.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic014.testMethod()); } [TestMethod] public void Other_operators_logic015_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_operators_logic015.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic015.testMethod()); } [TestMethod] public void Other_operators_logic016_Test() @@ -724,7 +724,7 @@ public void Other_operators_logic016_Test() OutputHelper.WriteLine("The operation x (double amp) y corresponds to the"); OutputHelper.WriteLine("operation x (amp) y except that y is evaluated only"); OutputHelper.WriteLine("if x is true."); - Assert.True(Other_TestClass_operators_logic016.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic016.testMethod()); } [TestMethod] public void Other_operators_logic017_Test() @@ -733,7 +733,7 @@ public void Other_operators_logic017_Test() OutputHelper.WriteLine("The operation x (double amp) y corresponds to the"); OutputHelper.WriteLine("operation x (amp) y except that y is evaluated only"); OutputHelper.WriteLine("if x is true."); - Assert.True(Other_TestClass_operators_logic017.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic017.testMethod()); } [TestMethod] public void Other_operators_logic018_Test() @@ -742,7 +742,7 @@ public void Other_operators_logic018_Test() OutputHelper.WriteLine("The operation x || y corresponds to the"); OutputHelper.WriteLine("operation x (amp) y except that y is evaluated only"); OutputHelper.WriteLine("if x is false."); - Assert.True(Other_TestClass_operators_logic018.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic018.testMethod()); } [TestMethod] public void Other_operators_logic019_Test() @@ -751,7 +751,7 @@ public void Other_operators_logic019_Test() OutputHelper.WriteLine("The operation x || y corresponds to the"); OutputHelper.WriteLine("operation x (amp) y except that y is evaluated only"); OutputHelper.WriteLine("if x is false."); - Assert.True(Other_TestClass_operators_logic019.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic019.testMethod()); } /* [TestMethod] @@ -770,7 +770,7 @@ public void Other_operators_logic022_Test() OutputHelper.WriteLine("return a result of type T."); OutputHelper.WriteLine("T must contain declarations of operator true and"); OutputHelper.WriteLine("operator false."); - Assert.True(Other_TestClass_operators_logic022.testMethod()) + Assert.IsTrue(Other_TestClass_operators_logic022.testMethod()) { return MFTestResults.Pass; } @@ -792,7 +792,7 @@ public void Other_operators_logic023_Test() OutputHelper.WriteLine("return a result of type T."); OutputHelper.WriteLine("T must contain declarations of operator true and"); OutputHelper.WriteLine("operator false."); - Assert.True(Other_TestClass_operators_logic023.testMethod()) + Assert.IsTrue(Other_TestClass_operators_logic023.testMethod()) { return MFTestResults.Pass; } @@ -802,7 +802,7 @@ public void Other_operators_logic023_Test() public void Other_operators_logic032_Test() { OutputHelper.WriteLine("Section 7.11"); - Assert.True(Other_TestClass_operators_logic032.testMethod()) + Assert.IsTrue(Other_TestClass_operators_logic032.testMethod()) { return MFTestResults.Pass; } @@ -813,7 +813,7 @@ public void Other_operators_logic032_Test() public void Other_operators_logic033_Test() { OutputHelper.WriteLine("Section 7.11"); - Assert.True(Other_TestClass_operators_logic033.testMethod()); + Assert.IsTrue(Other_TestClass_operators_logic033.testMethod()); } [TestMethod] public void Other_cond001_Test() @@ -826,7 +826,7 @@ public void Other_cond001_Test() OutputHelper.WriteLine("and becomes the result of the operation. Other_TestClass_?_A"); OutputHelper.WriteLine("conditional expression never evaluates both x"); OutputHelper.WriteLine("and y."); - Assert.True(Other_TestClass_cond001.testMethod()); + Assert.IsTrue(Other_TestClass_cond001.testMethod()); } [TestMethod] public void Other_cond002_Test() @@ -839,7 +839,7 @@ public void Other_cond002_Test() OutputHelper.WriteLine("and becomes the result of the operation. Other_TestClass_?_A"); OutputHelper.WriteLine("conditional expression never evaluates both x"); OutputHelper.WriteLine("and y."); - Assert.True(Other_TestClass_cond002.testMethod()); + Assert.IsTrue(Other_TestClass_cond002.testMethod()); } [TestMethod] public void Other_cond003_Test() @@ -852,7 +852,7 @@ public void Other_cond003_Test() OutputHelper.WriteLine("and becomes the result of the operation. Other_TestClass_?_A"); OutputHelper.WriteLine("conditional expression never evaluates both x"); OutputHelper.WriteLine("and y."); - Assert.True(Other_TestClass_cond003.testMethod()); + Assert.IsTrue(Other_TestClass_cond003.testMethod()); } [TestMethod] public void Other_cond004_Test() @@ -865,7 +865,7 @@ public void Other_cond004_Test() OutputHelper.WriteLine("and becomes the result of the operation. Other_TestClass_?_A"); OutputHelper.WriteLine("conditional expression never evaluates both x"); OutputHelper.WriteLine("and y."); - Assert.True(Other_TestClass_cond004.testMethod()); + Assert.IsTrue(Other_TestClass_cond004.testMethod()); } [TestMethod] public void Other_cond005_Test() @@ -874,7 +874,7 @@ public void Other_cond005_Test() OutputHelper.WriteLine("The conditional operator is right-associative, meaning"); OutputHelper.WriteLine("that operations are grouped from right to left. For example,"); OutputHelper.WriteLine("an expression of the form a?b:c?d:e is evaluated as a?b:(c?d:e)."); - Assert.True(Other_TestClass_cond005.testMethod()); + Assert.IsTrue(Other_TestClass_cond005.testMethod()); } [TestMethod] public void Other_cond006_Test() @@ -886,7 +886,7 @@ public void Other_cond006_Test() OutputHelper.WriteLine("of a type that implements operator true. If neither"); OutputHelper.WriteLine("of these requirements are satisfied, a compile-time"); OutputHelper.WriteLine("error occurs."); - Assert.True(Other_TestClass_cond006.testMethod()); + Assert.IsTrue(Other_TestClass_cond006.testMethod()); } [TestMethod] public void Other_cond008_Test() @@ -898,7 +898,7 @@ public void Other_cond008_Test() OutputHelper.WriteLine("of a type that implements operator true. If neither"); OutputHelper.WriteLine("of these requirements are satisfied, a compile-time"); OutputHelper.WriteLine("error occurs."); - Assert.True(Other_TestClass_cond008.testMethod()); + Assert.IsTrue(Other_TestClass_cond008.testMethod()); } [TestMethod] public void Other_cond010_Test() @@ -916,7 +916,7 @@ public void Other_cond010_Test() OutputHelper.WriteLine("is the type of the conditional expression."); OutputHelper.WriteLine("Otherwise, no expression type can be "); OutputHelper.WriteLine("determined, and a compile time error occurs. "); - Assert.True(Other_TestClass_cond010.testMethod()); + Assert.IsTrue(Other_TestClass_cond010.testMethod()); } [TestMethod] public void Other_cond011_Test() @@ -934,7 +934,7 @@ public void Other_cond011_Test() OutputHelper.WriteLine("is the type of the conditional expression."); OutputHelper.WriteLine("Otherwise, no expression type can be "); OutputHelper.WriteLine("determined, and a compile time error occurs. "); - Assert.True(Other_TestClass_cond011.testMethod()); + Assert.IsTrue(Other_TestClass_cond011.testMethod()); } [TestMethod] public void Other_cond014_Test() @@ -947,7 +947,7 @@ public void Other_cond014_Test() OutputHelper.WriteLine("a bool value."); OutputHelper.WriteLine("Otherwise, the operator true defined by the type of"); OutputHelper.WriteLine("b is invoked to produce a bool value."); - Assert.True(Other_TestClass_cond014.testMethod()); + Assert.IsTrue(Other_TestClass_cond014.testMethod()); } [TestMethod] public void Other_cond015_Test() @@ -960,7 +960,7 @@ public void Other_cond015_Test() OutputHelper.WriteLine("a bool value."); OutputHelper.WriteLine("Otherwise, the operator true defined by the type of"); OutputHelper.WriteLine("b is invoked to produce a bool value."); - Assert.True(Other_TestClass_cond015.testMethod()); + Assert.IsTrue(Other_TestClass_cond015.testMethod()); } [TestMethod] public void Other_is005_Test() @@ -971,7 +971,7 @@ public void Other_is005_Test() OutputHelper.WriteLine("of the form e is T, e must be an expression of a reference-type"); OutputHelper.WriteLine("and T must be a reference-type. If this is not the case, a compile"); OutputHelper.WriteLine("time error occurs."); - Assert.True(Other_TestClass_is005.testMethod()); + Assert.IsTrue(Other_TestClass_is005.testMethod()); } [TestMethod] public void Other_is006_Test() @@ -982,7 +982,7 @@ public void Other_is006_Test() OutputHelper.WriteLine("of the form e is T, e must be an expression of a reference-type"); OutputHelper.WriteLine("and T must be a reference-type. If this is not the case, a compile"); OutputHelper.WriteLine("time error occurs."); - Assert.True(Other_TestClass_is006.testMethod()); + Assert.IsTrue(Other_TestClass_is006.testMethod()); } [TestMethod] public void Other_is007_Test() @@ -995,7 +995,7 @@ public void Other_is007_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is007.testMethod()); + Assert.IsTrue(Other_TestClass_is007.testMethod()); } [TestMethod] public void Other_is008_Test() @@ -1008,7 +1008,7 @@ public void Other_is008_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is008.testMethod()); + Assert.IsTrue(Other_TestClass_is008.testMethod()); } [TestMethod] public void Other_is009_Test() @@ -1021,7 +1021,7 @@ public void Other_is009_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is009.testMethod()); + Assert.IsTrue(Other_TestClass_is009.testMethod()); } [TestMethod] public void Other_is010_Test() @@ -1034,7 +1034,7 @@ public void Other_is010_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is010.testMethod()); + Assert.IsTrue(Other_TestClass_is010.testMethod()); } [TestMethod] public void Other_is011_Test() @@ -1047,7 +1047,7 @@ public void Other_is011_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is011.testMethod()); + Assert.IsTrue(Other_TestClass_is011.testMethod()); } [TestMethod] public void Other_is012_Test() @@ -1060,7 +1060,7 @@ public void Other_is012_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is012.testMethod()); + Assert.IsTrue(Other_TestClass_is012.testMethod()); } [TestMethod] public void Other_is013_Test() @@ -1073,7 +1073,7 @@ public void Other_is013_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is013.testMethod()); + Assert.IsTrue(Other_TestClass_is013.testMethod()); } [TestMethod] public void Other_is014_Test() @@ -1086,7 +1086,7 @@ public void Other_is014_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is014.testMethod()); + Assert.IsTrue(Other_TestClass_is014.testMethod()); } [TestMethod] public void Other_is015_Test() @@ -1099,7 +1099,7 @@ public void Other_is015_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is015.testMethod()); + Assert.IsTrue(Other_TestClass_is015.testMethod()); } [TestMethod] public void Other_is016_Test() @@ -1112,7 +1112,7 @@ public void Other_is016_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is016.testMethod()); + Assert.IsTrue(Other_TestClass_is016.testMethod()); } [TestMethod] public void Other_is017_Test() @@ -1125,7 +1125,7 @@ public void Other_is017_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is017.testMethod()); + Assert.IsTrue(Other_TestClass_is017.testMethod()); } [TestMethod] public void Other_is018_Test() @@ -1138,7 +1138,7 @@ public void Other_is018_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is018.testMethod()); + Assert.IsTrue(Other_TestClass_is018.testMethod()); } [TestMethod] public void Other_is019_Test() @@ -1151,7 +1151,7 @@ public void Other_is019_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is019.testMethod()); + Assert.IsTrue(Other_TestClass_is019.testMethod()); } [TestMethod] public void Other_is020_Test() @@ -1164,7 +1164,7 @@ public void Other_is020_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is020.testMethod()); + Assert.IsTrue(Other_TestClass_is020.testMethod()); } [TestMethod] public void Other_is021_Test() @@ -1177,7 +1177,7 @@ public void Other_is021_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is021.testMethod()); + Assert.IsTrue(Other_TestClass_is021.testMethod()); } [TestMethod] public void Other_is022_Test() @@ -1190,7 +1190,7 @@ public void Other_is022_Test() OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); OutputHelper.WriteLine("System.Exception."); - Assert.True(Other_TestClass_is022.testMethod()); + Assert.IsTrue(Other_TestClass_is022.testMethod()); } [TestMethod] public void Other_is023_Test() @@ -1203,7 +1203,7 @@ public void Other_is023_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is023.testMethod()); + Assert.IsTrue(Other_TestClass_is023.testMethod()); } [TestMethod] public void Other_is024_Test() @@ -1216,7 +1216,7 @@ public void Other_is024_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is024.testMethod()); + Assert.IsTrue(Other_TestClass_is024.testMethod()); } [TestMethod] public void Other_is025_Test() @@ -1229,7 +1229,7 @@ public void Other_is025_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is025.testMethod()); + Assert.IsTrue(Other_TestClass_is025.testMethod()); } [TestMethod] public void Other_is026_Test() @@ -1242,7 +1242,7 @@ public void Other_is026_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is026.testMethod()); + Assert.IsTrue(Other_TestClass_is026.testMethod()); } [TestMethod] public void Other_is027_Test() @@ -1255,7 +1255,7 @@ public void Other_is027_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is027.testMethod()); + Assert.IsTrue(Other_TestClass_is027.testMethod()); } [TestMethod] @@ -1269,7 +1269,7 @@ public void Other_is028_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is028.testMethod()); + Assert.IsTrue(Other_TestClass_is028.testMethod()); } [TestMethod] @@ -1283,7 +1283,7 @@ public void Other_is029_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is029.testMethod()); + Assert.IsTrue(Other_TestClass_is029.testMethod()); } [TestMethod] @@ -1297,7 +1297,7 @@ public void Other_is030_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is030.testMethod()); + Assert.IsTrue(Other_TestClass_is030.testMethod()); } [TestMethod] @@ -1311,7 +1311,7 @@ public void Other_is031_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is031.testMethod()); + Assert.IsTrue(Other_TestClass_is031.testMethod()); } [TestMethod] @@ -1325,7 +1325,7 @@ public void Other_is032_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is032.testMethod()); + Assert.IsTrue(Other_TestClass_is032.testMethod()); } [TestMethod] @@ -1339,7 +1339,7 @@ public void Other_is033_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is033.testMethod()); + Assert.IsTrue(Other_TestClass_is033.testMethod()); } [TestMethod] @@ -1353,21 +1353,21 @@ public void Other_is034_Test() OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); - Assert.True(Other_TestClass_is034.testMethod()); + Assert.IsTrue(Other_TestClass_is034.testMethod()); } [TestMethod] public void Other_as001_Test() { OutputHelper.WriteLine("Section 7.9.10"); - Assert.True(Other_TestClass_as001.testMethod()); + Assert.IsTrue(Other_TestClass_as001.testMethod()); } [TestMethod] public void Other_as002_Test() { OutputHelper.WriteLine("Section 7.9.10"); - Assert.True(Other_TestClass_as002.testMethod()); + Assert.IsTrue(Other_TestClass_as002.testMethod()); } [TestMethod] @@ -1375,7 +1375,7 @@ public void Other_as003_Test() { OutputHelper.WriteLine("Section 7.9.10"); OutputHelper.WriteLine("string->object->array "); - Assert.True(Other_TestClass_as003.testMethod()); + Assert.IsTrue(Other_TestClass_as003.testMethod()); } [TestMethod] @@ -1383,7 +1383,7 @@ public void Other_as004_Test() { OutputHelper.WriteLine("Section 7.9.10"); OutputHelper.WriteLine("string->object->array "); - Assert.True(Other_TestClass_as004.testMethod()); + Assert.IsTrue(Other_TestClass_as004.testMethod()); } [TestMethod] @@ -1391,7 +1391,7 @@ public void Other_as007_Test() { OutputHelper.WriteLine("Section 7.9.10"); OutputHelper.WriteLine("string->object->array "); - Assert.True(Other_TestClass_as007.testMethod()); + Assert.IsTrue(Other_TestClass_as007.testMethod()); } [TestMethod] @@ -1399,7 +1399,7 @@ public void Other_as008_Test() { OutputHelper.WriteLine("Section 7.9.10"); OutputHelper.WriteLine("exp as object "); - Assert.True(Other_TestClass_as008.testMethod()); + Assert.IsTrue(Other_TestClass_as008.testMethod()); } [TestMethod] @@ -1407,7 +1407,7 @@ public void Other_as011_Test() { OutputHelper.WriteLine("Section 7.9.10"); OutputHelper.WriteLine("expression as for a deep inheritance"); - Assert.True(Other_TestClass_as011.testMethod()); + Assert.IsTrue(Other_TestClass_as011.testMethod()); } [TestMethod] @@ -1415,7 +1415,7 @@ public void Other_as012_Test() { OutputHelper.WriteLine("Section 7.9.10"); OutputHelper.WriteLine("expression as non-type through interface (check at runtime)"); - Assert.True(Other_TestClass_as012.testMethod()); + Assert.IsTrue(Other_TestClass_as012.testMethod()); } [TestMethod] @@ -1425,7 +1425,7 @@ public void Other_add001_Test() OutputHelper.WriteLine("When one or both operands are of type string, the"); OutputHelper.WriteLine("predefined addition operators concatenate the string"); OutputHelper.WriteLine("representation of the operands."); - Assert.True(Other_TestClass_add001.testMethod()); + Assert.IsTrue(Other_TestClass_add001.testMethod()); } [TestMethod] @@ -1435,7 +1435,7 @@ public void Other_add002_Test() OutputHelper.WriteLine("When one or both operands are of type string, the"); OutputHelper.WriteLine("predefined addition operators concatenate the string"); OutputHelper.WriteLine("representation of the operands."); - Assert.True(Other_TestClass_add002.testMethod()); + Assert.IsTrue(Other_TestClass_add002.testMethod()); } [TestMethod] @@ -1445,7 +1445,7 @@ public void Other_add003_Test() OutputHelper.WriteLine("When one or both operands are of type string, the"); OutputHelper.WriteLine("predefined addition operators concatenate the string"); OutputHelper.WriteLine("representation of the operands."); - Assert.True(Other_TestClass_add003.testMethod()); + Assert.IsTrue(Other_TestClass_add003.testMethod()); } [TestMethod] @@ -1455,7 +1455,7 @@ public void Other_add004_Test() OutputHelper.WriteLine("When one or both operands are of type string, the"); OutputHelper.WriteLine("predefined addition operators concatenate the string"); OutputHelper.WriteLine("representation of the operands."); - Assert.True(Other_TestClass_add004.testMethod()); + Assert.IsTrue(Other_TestClass_add004.testMethod()); } [TestMethod] @@ -1465,7 +1465,7 @@ public void Other_add005_Test() OutputHelper.WriteLine("When one or both operands are of type string, the"); OutputHelper.WriteLine("predefined addition operators concatenate the string"); OutputHelper.WriteLine("representation of the operands."); - Assert.True(Other_TestClass_add005.testMethod()); + Assert.IsTrue(Other_TestClass_add005.testMethod()); } [TestMethod] @@ -1475,224 +1475,224 @@ public void Other_add006_Test() OutputHelper.WriteLine("When one or both operands are of type string, the"); OutputHelper.WriteLine("predefined addition operators concatenate the string"); OutputHelper.WriteLine("representation of the operands."); - Assert.True(Other_TestClass_add006.testMethod()); + Assert.IsTrue(Other_TestClass_add006.testMethod()); } [TestMethod] public void Other_logic001_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic001.testMethod()); + Assert.IsTrue(Other_TestClass_logic001.testMethod()); } [TestMethod] public void Other_logic002_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic002.testMethod()); + Assert.IsTrue(Other_TestClass_logic002.testMethod()); } [TestMethod] public void Other_logic003_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic003.testMethod()); + Assert.IsTrue(Other_TestClass_logic003.testMethod()); } [TestMethod] public void Other_logic004_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic004.testMethod()); + Assert.IsTrue(Other_TestClass_logic004.testMethod()); } [TestMethod] public void Other_logic005_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic005.testMethod()); + Assert.IsTrue(Other_TestClass_logic005.testMethod()); } [TestMethod] public void Other_logic006_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic006.testMethod()); + Assert.IsTrue(Other_TestClass_logic006.testMethod()); } [TestMethod] public void Other_logic007_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic007.testMethod()); + Assert.IsTrue(Other_TestClass_logic007.testMethod()); } [TestMethod] public void Other_logic008_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic008.testMethod()); + Assert.IsTrue(Other_TestClass_logic008.testMethod()); } [TestMethod] public void Other_logic009_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic009.testMethod()); + Assert.IsTrue(Other_TestClass_logic009.testMethod()); } [TestMethod] public void Other_logic010_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic010.testMethod()); + Assert.IsTrue(Other_TestClass_logic010.testMethod()); } [TestMethod] public void Other_logic011_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic011.testMethod()); + Assert.IsTrue(Other_TestClass_logic011.testMethod()); } [TestMethod] public void Other_logic012_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic012.testMethod()); + Assert.IsTrue(Other_TestClass_logic012.testMethod()); } [TestMethod] public void Other_logic013_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic013.testMethod()); + Assert.IsTrue(Other_TestClass_logic013.testMethod()); } [TestMethod] public void Other_logic014_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic014.testMethod()); + Assert.IsTrue(Other_TestClass_logic014.testMethod()); } [TestMethod] public void Other_logic015_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic015.testMethod()); + Assert.IsTrue(Other_TestClass_logic015.testMethod()); } [TestMethod] public void Other_logic016_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic016.testMethod()); + Assert.IsTrue(Other_TestClass_logic016.testMethod()); } [TestMethod] public void Other_logic017_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic017.testMethod()); + Assert.IsTrue(Other_TestClass_logic017.testMethod()); } [TestMethod] public void Other_logic018_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic018.testMethod()); + Assert.IsTrue(Other_TestClass_logic018.testMethod()); } [TestMethod] public void Other_logic019_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic019.testMethod()); + Assert.IsTrue(Other_TestClass_logic019.testMethod()); } [TestMethod] public void Other_logic020_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic020.testMethod()); + Assert.IsTrue(Other_TestClass_logic020.testMethod()); } [TestMethod] public void Other_logic021_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic021.testMethod()); + Assert.IsTrue(Other_TestClass_logic021.testMethod()); } [TestMethod] public void Other_logic022_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic022.testMethod()); + Assert.IsTrue(Other_TestClass_logic022.testMethod()); } [TestMethod] public void Other_logic023_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic023.testMethod()); + Assert.IsTrue(Other_TestClass_logic023.testMethod()); } [TestMethod] public void Other_logic024_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic024.testMethod()); + Assert.IsTrue(Other_TestClass_logic024.testMethod()); } [TestMethod] public void Other_logic025_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic025.testMethod()); + Assert.IsTrue(Other_TestClass_logic025.testMethod()); } [TestMethod] public void Other_logic026_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic026.testMethod()); + Assert.IsTrue(Other_TestClass_logic026.testMethod()); } [TestMethod] public void Other_logic027_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic027.testMethod()); + Assert.IsTrue(Other_TestClass_logic027.testMethod()); } [TestMethod] public void Other_logic028_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic028.testMethod()); + Assert.IsTrue(Other_TestClass_logic028.testMethod()); } [TestMethod] public void Other_logic029_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic029.testMethod()); + Assert.IsTrue(Other_TestClass_logic029.testMethod()); } [TestMethod] public void Other_logic030_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic030.testMethod()); + Assert.IsTrue(Other_TestClass_logic030.testMethod()); } [TestMethod] public void Other_logic032_Test() { OutputHelper.WriteLine("Section 7.10"); - Assert.True(Other_TestClass_logic032.testMethod()); + Assert.IsTrue(Other_TestClass_logic032.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestArray/NFUnitTestArray.nfproj b/Tests/NFUnitTestArray/NFUnitTestArray.nfproj index 46709aab..245da723 100644 --- a/Tests/NFUnitTestArray/NFUnitTestArray.nfproj +++ b/Tests/NFUnitTestArray/NFUnitTestArray.nfproj @@ -35,7 +35,7 @@ - + @@ -45,6 +45,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestArray/UnitTestOtherTests.cs b/Tests/NFUnitTestArray/UnitTestOtherTests.cs index 8ab18ca2..afea51ce 100644 --- a/Tests/NFUnitTestArray/UnitTestOtherTests.cs +++ b/Tests/NFUnitTestArray/UnitTestOtherTests.cs @@ -18,7 +18,7 @@ public void Othersystemarrays_conversion_01_Test() { OutputHelper.WriteLine("System.Array Type - Conversions "); OutputHelper.WriteLine("Verify that an implicit reference conversion from T[D] to System.Array exists"); - Assert.True(Other_TestClass_systemarrays_conversion_01.testMethod()); + Assert.IsTrue(Other_TestClass_systemarrays_conversion_01.testMethod()); } [TestMethod] @@ -26,7 +26,7 @@ public void Othersystemarrays_conversion_02_Test() { OutputHelper.WriteLine("System.Array Type - Conversions "); OutputHelper.WriteLine("Verify that an explicit reference conversion from System.Array to T[D] exists"); - Assert.True(Other_TestClass_systemarrays_conversion_02.testMethod()); + Assert.IsTrue(Other_TestClass_systemarrays_conversion_02.testMethod()); } [TestMethod] @@ -34,13 +34,13 @@ public void Othersystemarrays_nullvalue_01_Test() { OutputHelper.WriteLine("System.Array Type - Null Values"); OutputHelper.WriteLine("Verify that a System.Array array can be set to null"); - Assert.True(Other_TestClass_systemarrays_nullvalue_01.testMethod()); + Assert.IsTrue(Other_TestClass_systemarrays_nullvalue_01.testMethod()); } [TestMethod] public void Othercovariance_exception_01_Test() { - Assert.True(Other_TestClass_covariance_exception_01.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_exception_01.testMethod()); } [TestMethod] @@ -48,7 +48,7 @@ public void Othercovariance_exception_02_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify an System.Exception is thrown when incompatible types are assigned to array elements"); - Assert.True(Other_TestClass_covariance_exception_02.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_exception_02.testMethod()); } [TestMethod] @@ -56,7 +56,7 @@ public void Othercovariance_explicit_01_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from object to any reference-type (class)"); - Assert.True(Other_TestClass_covariance_explicit_01.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_explicit_01.testMethod()); } [TestMethod] @@ -64,7 +64,7 @@ public void Othercovariance_explicit_02_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from any reference-type (interface) to object"); - Assert.True(Other_TestClass_covariance_explicit_02.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_explicit_02.testMethod()); } [TestMethod] @@ -72,7 +72,7 @@ public void Othercovariance_explicit_03_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from any class-type S to any class-type T, provided S is base class of T"); - Assert.True(Other_TestClass_covariance_explicit_03.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_explicit_03.testMethod()); } [TestMethod] @@ -80,7 +80,7 @@ public void Othercovariance_explicit_04_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from any interface-type S to any interface-type T, provided S is not derived from T"); - Assert.True(Other_TestClass_covariance_explicit_04.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_explicit_04.testMethod()); } [TestMethod] @@ -88,7 +88,7 @@ public void Othercovariance_implicit_01_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from any reference-type (class) to object"); - Assert.True(Other_TestClass_covariance_implicit_01.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_implicit_01.testMethod()); } [TestMethod] @@ -96,7 +96,7 @@ public void Othercovariance_implicit_02_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from any reference-type (interface) to object"); - Assert.True(Other_TestClass_covariance_implicit_02.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_implicit_02.testMethod()); } [TestMethod] @@ -104,7 +104,7 @@ public void Othercovariance_implicit_03_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from any class-type S to any class-type T, provided S is derived from T"); - Assert.True(Other_TestClass_covariance_implicit_03.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_implicit_03.testMethod()); } [TestMethod] @@ -112,7 +112,7 @@ public void Othercovariance_implicit_04_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from any class-type S to any interface-type T, provided S implements T"); - Assert.True(Other_TestClass_covariance_implicit_04.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_implicit_04.testMethod()); } [TestMethod] @@ -120,7 +120,7 @@ public void Othercovariance_implicit_05_Test() { OutputHelper.WriteLine("Array Covariance"); OutputHelper.WriteLine("Verify covariance from any interface-type S to any interface-type T, provided S is derived from T"); - Assert.True(Other_TestClass_covariance_implicit_05.testMethod()); + Assert.IsTrue(Other_TestClass_covariance_implicit_05.testMethod()); } [TestMethod] @@ -135,7 +135,7 @@ public void BinarySearch_Test() } int y = Array.BinarySearch(objects, new MyClass(5), null); - Assert.Equal(y, 4); + Assert.AreEqual(y, 4); } class MyClass : IComparable diff --git a/Tests/NFUnitTestArray/UnitTestSimpleTests.cs b/Tests/NFUnitTestArray/UnitTestSimpleTests.cs index 645bb364..bc9c082f 100644 --- a/Tests/NFUnitTestArray/UnitTestSimpleTests.cs +++ b/Tests/NFUnitTestArray/UnitTestSimpleTests.cs @@ -19,14 +19,14 @@ public void Simple_decl_decl_01_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type int"); - Assert.True(Simple_TestClass_decl_decl_01.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_01.testMethod()); } [TestMethod] public void Simple_decl_decl_02_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type byte"); - Assert.True(Simple_TestClass_decl_decl_02.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_02.testMethod()); } [TestMethod] public void Simple_decl_decl_03_Test() @@ -34,7 +34,7 @@ public void Simple_decl_decl_03_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type short"); - Assert.True(Simple_TestClass_decl_decl_03.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_03.testMethod()); } [TestMethod] public void Simple_decl_decl_04_Test() @@ -42,7 +42,7 @@ public void Simple_decl_decl_04_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type long"); - Assert.True(Simple_TestClass_decl_decl_04.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_04.testMethod()); } [TestMethod] public void Simple_decl_decl_05_Test() @@ -50,7 +50,7 @@ public void Simple_decl_decl_05_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type char"); - Assert.True(Simple_TestClass_decl_decl_05.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_05.testMethod()); } [TestMethod] public void Simple_decl_decl_06_Test() @@ -58,7 +58,7 @@ public void Simple_decl_decl_06_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type double"); - Assert.True(Simple_TestClass_decl_decl_06.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_06.testMethod()); } [TestMethod] public void Simple_decl_decl_07_Test() @@ -66,7 +66,7 @@ public void Simple_decl_decl_07_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type float"); - Assert.True(Simple_TestClass_decl_decl_07.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_07.testMethod()); } [TestMethod] public void Simple_decl_decl_08_Test() @@ -74,7 +74,7 @@ public void Simple_decl_decl_08_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type double"); - Assert.True(Simple_TestClass_decl_decl_08.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_08.testMethod()); } [TestMethod] public void Simple_decl_decl_09_Test() @@ -82,7 +82,7 @@ public void Simple_decl_decl_09_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type bool"); - Assert.True(Simple_TestClass_decl_decl_09.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_09.testMethod()); } [TestMethod] public void Simple_decl_decl_10_Test() @@ -90,7 +90,7 @@ public void Simple_decl_decl_10_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of a user-defined struct"); - Assert.True(Simple_TestClass_decl_decl_10.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_10.testMethod()); } [TestMethod] public void Simple_decl_decl_11_Test() @@ -98,7 +98,7 @@ public void Simple_decl_decl_11_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of a user-defined class"); - Assert.True(Simple_TestClass_decl_decl_11.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_11.testMethod()); } [TestMethod] public void Simple_decl_decl_12_Test() @@ -106,7 +106,7 @@ public void Simple_decl_decl_12_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of a user-defined interface"); - Assert.True(Simple_TestClass_decl_decl_12.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_12.testMethod()); } [TestMethod] public void Simple_decl_decl_13_Test() @@ -114,7 +114,7 @@ public void Simple_decl_decl_13_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type object"); - Assert.True(Simple_TestClass_decl_decl_13.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_13.testMethod()); } [TestMethod] public void Simple_decl_decl_14_Test() @@ -122,7 +122,7 @@ public void Simple_decl_decl_14_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of delegates"); - Assert.True(Simple_TestClass_decl_decl_14.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_14.testMethod()); } [TestMethod] public void Simple_decl_decl_15_Test() @@ -130,7 +130,7 @@ public void Simple_decl_decl_15_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Declare a simple array of type System.Array"); - Assert.True(Simple_TestClass_decl_decl_15.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_decl_15.testMethod()); } [TestMethod] public void Simple_decl_bounds_01_Test() @@ -138,7 +138,7 @@ public void Simple_decl_bounds_01_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" An array created as array[0] compiles successfully"); - Assert.True(Simple_TestClass_decl_bounds_01.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_bounds_01.testMethod()); } [TestMethod] public void Simple_decl_bounds_02_Test() @@ -147,7 +147,7 @@ public void Simple_decl_bounds_02_Test() OutputHelper.WriteLine(" An array created as array[maxint] compiles successfully"); OutputHelper.WriteLine("This test is expected to generate"); OutputHelper.WriteLine("Out Of Memory System.Exception"); - Assert.False(Simple_TestClass_decl_bounds_02.testMethod()); + Assert.IsFalse(Simple_TestClass_decl_bounds_02.testMethod()); OutputHelper.WriteLine(" This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine(" It previously marked as known failure because of bug # 16823"); OutputHelper.WriteLine(" The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -158,7 +158,7 @@ public void Simple_decl_bounds_03_Test() OutputHelper.WriteLine(" decl_bounds_03 "); OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" An array created as array[maxint+1] compiles successfully"); - Assert.False(Simple_TestClass_decl_bounds_03.testMethod()); + Assert.IsFalse(Simple_TestClass_decl_bounds_03.testMethod()); OutputHelper.WriteLine(" This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine(" It previously marked as known failure because of bug # 16823"); OutputHelper.WriteLine(" The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -170,21 +170,21 @@ public void Simple_decl_index_01_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A char variable as an array index should work"); - Assert.True(Simple_TestClass_decl_index_01.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_01.testMethod()); } [TestMethod] public void Simple_decl_index_02_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A byte variable as an array index should work"); - Assert.True(Simple_TestClass_decl_index_02.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_02.testMethod()); } [TestMethod] public void Simple_decl_index_03_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A short variable as an array index should work"); - Assert.True(Simple_TestClass_decl_index_03.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_03.testMethod()); } [TestMethod] public void Simple_decl_index_04_Test() @@ -192,105 +192,105 @@ public void Simple_decl_index_04_Test() OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A short literal as an array index should work"); - Assert.True(Simple_TestClass_decl_index_04.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_04.testMethod()); } [TestMethod] public void Simple_decl_index_05_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A byte literal as an array index should work"); - Assert.True(Simple_TestClass_decl_index_05.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_05.testMethod()); } [TestMethod] public void Simple_decl_index_06_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A char literal as an array index should work"); - Assert.True(Simple_TestClass_decl_index_06.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_06.testMethod()); } [TestMethod] public void Simple_decl_index_07_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A uint variable as an array index should work"); - Assert.True(Simple_TestClass_decl_index_07.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_07.testMethod()); } [TestMethod] public void Simple_decl_index_08_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A long variable as an array index should work"); - Assert.True(Simple_TestClass_decl_index_08.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_08.testMethod()); } [TestMethod] public void Simple_decl_index_09_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A ulong variable as an array index should work"); - Assert.True(Simple_TestClass_decl_index_09.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_09.testMethod()); } [TestMethod] public void Simple_decl_index_10_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A uint literal as an array index should work"); - Assert.True(Simple_TestClass_decl_index_10.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_10.testMethod()); } [TestMethod] public void Simple_decl_index_11_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A long literal as an array index should work"); - Assert.True(Simple_TestClass_decl_index_11.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_11.testMethod()); } [TestMethod] public void Simple_decl_index_12_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" A ulong literal as an array index should work"); - Assert.True(Simple_TestClass_decl_index_12.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_index_12.testMethod()); } [TestMethod] public void Simple_decl_syntax_03_Test() { OutputHelper.WriteLine(" Arrays - Declarations"); OutputHelper.WriteLine(" Spaces after type and between brackets and comments do not affect arrays"); - Assert.True(Simple_TestClass_decl_syntax_03.testMethod()); + Assert.IsTrue(Simple_TestClass_decl_syntax_03.testMethod()); } [TestMethod] public void Simple_init_init_a_01_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type int using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_01.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_01.testMethod()); } [TestMethod] public void Simple_init_init_a_02_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type short using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_02.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_02.testMethod()); } [TestMethod] public void Simple_init_init_a_03_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type byte using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_03.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_03.testMethod()); } [TestMethod] public void Simple_init_init_a_04_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type long using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_04.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_04.testMethod()); } [TestMethod] public void Simple_init_init_a_05_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type double using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_05.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_05.testMethod()); } [TestMethod] public void Simple_init_init_a_06_Test() @@ -298,84 +298,84 @@ public void Simple_init_init_a_06_Test() OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type float using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_06.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_06.testMethod()); } [TestMethod] public void Simple_init_init_a_08_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type String using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_08.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_08.testMethod()); } [TestMethod] public void Simple_init_init_a_09_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type char using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_09.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_09.testMethod()); } [TestMethod] public void Simple_init_init_a_10_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type bool using new (longhand)"); - Assert.True(Simple_TestClass_init_init_a_10.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_a_10.testMethod()); } [TestMethod] public void Simple_init_init_b_01_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type int using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_01.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_01.testMethod()); } [TestMethod] public void Simple_init_init_b_02_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type short using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_02.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_02.testMethod()); } [TestMethod] public void Simple_init_init_b_03_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type byte using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_03.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_03.testMethod()); } [TestMethod] public void Simple_init_init_b_04_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type long using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_04.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_04.testMethod()); } [TestMethod] public void Simple_init_init_b_05_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type double using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_05.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_05.testMethod()); } [TestMethod] public void Simple_init_init_b_06_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type float using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_06.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_06.testMethod()); } [TestMethod] public void Simple_init_init_b_08_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type String using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_08.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_08.testMethod()); } [TestMethod] public void Simple_init_init_b_09_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type char using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_09.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_09.testMethod()); } [TestMethod] public void Simple_init_init_b_10_Test() @@ -383,245 +383,245 @@ public void Simple_init_init_b_10_Test() OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type bool using new (shorthand)"); - Assert.True(Simple_TestClass_init_init_b_10.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_b_10.testMethod()); } [TestMethod] public void Simple_init_init_c_01_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type int using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_01.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_01.testMethod()); } [TestMethod] public void Simple_init_init_c_02_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type short using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_02.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_02.testMethod()); } [TestMethod] public void Simple_init_init_c_03_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type byte using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_03.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_03.testMethod()); } [TestMethod] public void Simple_init_init_c_04_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type long using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_04.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_04.testMethod()); } [TestMethod] public void Simple_init_init_c_05_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type double using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_05.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_05.testMethod()); } [TestMethod] public void Simple_init_init_c_06_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type float using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_06.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_06.testMethod()); } [TestMethod] public void Simple_init_init_c_08_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type String using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_08.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_08.testMethod()); } [TestMethod] public void Simple_init_init_c_09_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type char using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_09.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_09.testMethod()); } [TestMethod] public void Simple_init_init_c_10_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type bool using new (# init values sets array size)"); - Assert.True(Simple_TestClass_init_init_c_10.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_c_10.testMethod()); } [TestMethod] public void Simple_init_init_d_01_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type int using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_01.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_01.testMethod()); } [TestMethod] public void Simple_init_init_d_02_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type short using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_02.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_02.testMethod()); } [TestMethod] public void Simple_init_init_d_03_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type byte using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_03.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_03.testMethod()); } [TestMethod] public void Simple_init_init_d_04_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type long using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_04.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_04.testMethod()); } [TestMethod] public void Simple_init_init_d_05_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type double using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_05.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_05.testMethod()); } [TestMethod] public void Simple_init_init_d_06_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type float using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_06.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_06.testMethod()); } [TestMethod] public void Simple_init_init_d_08_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type String using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_08.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_08.testMethod()); } [TestMethod] public void Simple_init_init_d_09_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type char using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_09.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_09.testMethod()); } [TestMethod] public void Simple_init_init_d_10_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type bool using new (longhand) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_d_10.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_d_10.testMethod()); } [TestMethod] public void Simple_init_init_e_01_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type int using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_01.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_01.testMethod()); } [TestMethod] public void Simple_init_init_e_02_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type short using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_02.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_02.testMethod()); } [TestMethod] public void Simple_init_init_e_03_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type byte using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_03.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_03.testMethod()); } [TestMethod] public void Simple_init_init_e_04_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type long using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_04.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_04.testMethod()); } [TestMethod] public void Simple_init_init_e_05_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type double using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_05.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_05.testMethod()); } [TestMethod] public void Simple_init_init_e_06_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type float using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_06.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_06.testMethod()); } [TestMethod] public void Simple_init_init_e_08_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type String using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_08.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_08.testMethod()); } [TestMethod] public void Simple_init_init_e_09_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type char using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_09.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_09.testMethod()); } [TestMethod] public void Simple_init_init_e_10_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type bool using new (# init values sets array size) separate from decl statement"); - Assert.True(Simple_TestClass_init_init_e_10.testMethod()); + Assert.IsTrue(Simple_TestClass_init_init_e_10.testMethod()); } [TestMethod] public void Simple_init_syntax_09_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Syntax - Whitespace and comments in braces should not affect anything"); - Assert.True(Simple_TestClass_init_syntax_09.testMethod()); + Assert.IsTrue(Simple_TestClass_init_syntax_09.testMethod()); } [TestMethod] public void Simple_init_syntax_11_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Syntax - zero elements in initializer should create zero length array"); - Assert.True(Simple_TestClass_init_syntax_11.testMethod()); + Assert.IsTrue(Simple_TestClass_init_syntax_11.testMethod()); } [TestMethod] public void Simple_init_syntax_12_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Syntax - zero elements in initializer should be allowed for 0-length array"); - Assert.True(Simple_TestClass_init_syntax_12.testMethod()); + Assert.IsTrue(Simple_TestClass_init_syntax_12.testMethod()); } [TestMethod] public void Simple_init_decl_02_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Declaration - if initializer is used, a provided index can be a const"); - Assert.True(Simple_TestClass_init_decl_02.testMethod()); + Assert.IsTrue(Simple_TestClass_init_decl_02.testMethod()); } [TestMethod] public void Simple_init_decl_03_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Declaration - if initializer is used, a provided index can be a const short"); - Assert.True(Simple_TestClass_init_decl_03.testMethod()); + Assert.IsTrue(Simple_TestClass_init_decl_03.testMethod()); } [TestMethod] public void Simple_init_decl_04_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Declaration - if initializer is used, a provided index can be a const byte"); - Assert.True(Simple_TestClass_init_decl_04.testMethod()); + Assert.IsTrue(Simple_TestClass_init_decl_04.testMethod()); } [TestMethod] public void Simple_init_decl_05_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Declaration - if initializer is used, a provided index can be a const long casted to an int"); - Assert.True(Simple_TestClass_init_decl_05.testMethod()); + Assert.IsTrue(Simple_TestClass_init_decl_05.testMethod()); } [TestMethod] public void Simple_init_shorthand_01_Test() @@ -629,14 +629,14 @@ public void Simple_init_shorthand_01_Test() OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Initialization of arrays of type int using new (shorthand)"); OutputHelper.WriteLine(" This is to verify bug #52958 doesn't regress"); - Assert.True(Simple_TestClass_init_shorthand_01.testMethod()); + Assert.IsTrue(Simple_TestClass_init_shorthand_01.testMethod()); } [TestMethod] public void Simple_init_constinit_01_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Ensure all constant init optimization code paths are covered: all constants (VS7:124565 for more info)"); - Assert.True(Simple_TestClass_init_constinit_01.testMethod()); + Assert.IsTrue(Simple_TestClass_init_constinit_01.testMethod()); } [TestMethod] public void Simple_init_constinit_02_Test() @@ -644,14 +644,14 @@ public void Simple_init_constinit_02_Test() OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Ensure all constant init optimization code paths are covered: all variables (VS7:124565 for more info)"); - Assert.True(Simple_TestClass_init_constinit_02.testMethod()); + Assert.IsTrue(Simple_TestClass_init_constinit_02.testMethod()); } [TestMethod] public void Simple_init_constinit_03_Test() { OutputHelper.WriteLine(" Arrays - Initialization"); OutputHelper.WriteLine(" Ensure all constant init optimization code paths are covered: half variables and half constants (VS7:124565 for more info)"); - Assert.True(Simple_TestClass_init_constinit_03.testMethod()); + Assert.IsTrue(Simple_TestClass_init_constinit_03.testMethod()); } [TestMethod] public void Simple_acc_iter_length_01_Test() @@ -659,49 +659,49 @@ public void Simple_acc_iter_length_01_Test() OutputHelper.WriteLine(" acc_iter_length_01 "); OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Declare simple arrays of various lengths and verify that array.Length is correct"); - Assert.True(Simple_TestClass_acc_iter_length_01.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_length_01.testMethod()); } [TestMethod] public void Simple_acc_iter_bounds_01_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's 0th element should work fine"); - Assert.True(Simple_TestClass_acc_iter_bounds_01.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_bounds_01.testMethod()); } [TestMethod] public void Simple_acc_iter_bounds_02_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's maxlength element should work fine"); - Assert.True(Simple_TestClass_acc_iter_bounds_02.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_bounds_02.testMethod()); } [TestMethod] public void Simple_acc_iter_bounds_03_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's -1 element should throw an System.Exception"); - Assert.True(Simple_TestClass_acc_iter_bounds_03.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_bounds_03.testMethod()); } [TestMethod] public void Simple_acc_iter_bounds_04_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's maxlength+1 element should throw an System.Exception"); - Assert.True(Simple_TestClass_acc_iter_bounds_04.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_bounds_04.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_01_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a variable of type int should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_a_01.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_01.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_02_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a variable of type short should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_a_02.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_02.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_03_Test() @@ -709,21 +709,21 @@ public void Simple_acc_iter_idxtype_a_03_Test() OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a variable of type byte should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_a_03.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_03.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_04_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a variable of type char should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_a_04.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_04.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_06_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a variable of type long should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_a_06.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_06.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_01_Test() @@ -731,154 +731,154 @@ public void Simple_acc_iter_idxtype_b_01_Test() OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with an int literal should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_b_01.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_01.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_02_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a short literal should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_b_02.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_02.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_03_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a byte literal should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_b_03.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_03.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_04_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a char literal should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_b_04.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_04.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_06_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Accessing an array's index with a variable of type long should work"); - Assert.True(Simple_TestClass_acc_iter_idxtype_b_06.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_06.testMethod()); } [TestMethod] public void Simple_acc_iter_iter_01_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Declare simple array of int, init it through iteration, verify values are correct"); - Assert.True(Simple_TestClass_acc_iter_iter_01.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_iter_01.testMethod()); } [TestMethod] public void Simple_acc_iter_iter_02_Test() { OutputHelper.WriteLine(" Arrays - Access and Iteration"); OutputHelper.WriteLine(" Declare simple array of char, init it through individual element assignments, verify correctness"); - Assert.True(Simple_TestClass_acc_iter_iter_02.testMethod()); + Assert.IsTrue(Simple_TestClass_acc_iter_iter_02.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_01_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning int type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_01.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_01.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_02_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning byte type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_02.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_02.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_03_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning short type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_03.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_03.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_04_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning long type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_04.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_04.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_05_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning char type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_05.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_05.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_06_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning double type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_06.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_06.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_07_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning float type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_07.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_07.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_08_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning double type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_08.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_08.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_09_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning bool type literals into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_a_09.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_a_09.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_01_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning int type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_01.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_01.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_02_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning byte type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_02.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_02.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_03_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning short type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_03.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_03.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_04_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning long type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_04.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_04.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_05_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning char type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_05.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_05.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_06_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning double type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_06.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_06.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_07_Test() @@ -886,7 +886,7 @@ public void Simple_assign_smpass_b_07_Test() OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning float type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_07.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_07.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_08_Test() @@ -894,84 +894,84 @@ public void Simple_assign_smpass_b_08_Test() OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning double type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_08.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_08.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_09_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning bool type variables into array elements should work"); - Assert.True(Simple_TestClass_assign_smpass_b_09.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_smpass_b_09.testMethod()); } [TestMethod] public void Simple_assign_badass_01_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning null to an array variable should work"); - Assert.True(Simple_TestClass_assign_badass_01.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_badass_01.testMethod()); } [TestMethod] public void Simple_assign_badass_03_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning a smaller array to a bigger array should work"); - Assert.True(Simple_TestClass_assign_badass_03.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_badass_03.testMethod()); } [TestMethod] public void Simple_assign_badass_04_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning a bigger array to a smaller array should work"); - Assert.True(Simple_TestClass_assign_badass_04.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_badass_04.testMethod()); } [TestMethod] public void Simple_assign_element_01_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning one element to another element of the same array should work"); - Assert.True(Simple_TestClass_assign_element_01.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_element_01.testMethod()); } [TestMethod] public void Simple_assign_element_02_Test() { OutputHelper.WriteLine(" Arrays - Assignments"); OutputHelper.WriteLine(" Assigning one element to another element of a different array should work"); - Assert.True(Simple_TestClass_assign_element_02.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_element_02.testMethod()); } [TestMethod] public void Simple_assign_argpass_01_Test() { OutputHelper.WriteLine(" Arrays - Assignments - Passing elements to methods"); OutputHelper.WriteLine(" Passing an element to a function should work"); - Assert.True(Simple_TestClass_assign_argpass_01.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_argpass_01.testMethod()); } [TestMethod] public void Simple_assign_argpass_02_Test() { OutputHelper.WriteLine(" Arrays - Assignments - Passing elements to methods"); OutputHelper.WriteLine(" Passing an element to a function as a ref parameter should work"); - Assert.True(Simple_TestClass_assign_argpass_02.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_argpass_02.testMethod()); } [TestMethod] public void Simple_assign_argpass_03_Test() { OutputHelper.WriteLine(" Arrays - Assignments - Passing elements to methods"); OutputHelper.WriteLine(" Passing an element to a function as an out parameter should work"); - Assert.True(Simple_TestClass_assign_argpass_03.testMethod()); + Assert.IsTrue(Simple_TestClass_assign_argpass_03.testMethod()); } [TestMethod] public void Simple_object_sysarr_01_Test() { OutputHelper.WriteLine(" Arrays - As Object and System.Array"); OutputHelper.WriteLine(" Testing the System.Array methods and Properties: System.Array.Clear()"); - Assert.True(Simple_TestClass_object_sysarr_01.testMethod()); + Assert.IsTrue(Simple_TestClass_object_sysarr_01.testMethod()); } [TestMethod] public void Simple_object_sysarr_02_Test() { OutputHelper.WriteLine(" Arrays - As Object and System.Array"); OutputHelper.WriteLine(" Testing the System.Array methods and Properties: Length property"); - Assert.True(Simple_TestClass_object_sysarr_02.testMethod()); + Assert.IsTrue(Simple_TestClass_object_sysarr_02.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestAttributes/NFUnitTestAttributes.nfproj b/Tests/NFUnitTestAttributes/NFUnitTestAttributes.nfproj index 25946e08..6d102acb 100644 --- a/Tests/NFUnitTestAttributes/NFUnitTestAttributes.nfproj +++ b/Tests/NFUnitTestAttributes/NFUnitTestAttributes.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs b/Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs index 0461cbf8..e22bf662 100644 --- a/Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs +++ b/Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs @@ -18,28 +18,28 @@ public class UnitTestAttributesTest1 public void Attrib_attrib000_Test() { OutputHelper.WriteLine("Declare a basic attribute class, example from C# Language reference, 1.1"); - Assert.True(Attrib_TestClass_attrib000.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib000.testMethod()); } [TestMethod] public void Attrib_attrib000_2_Test() { OutputHelper.WriteLine("17.1 - A non-abstract attribute class must have public accessibility."); - Assert.True(Attrib_TestClass_attrib000_2.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib000_2.testMethod()); } [TestMethod] public void Attrib_attrib001_Test() { OutputHelper.WriteLine("Declare a basic attribute class, example from C# Language reference, 1.1"); - Assert.True(Attrib_TestClass_attrib001.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib001.testMethod()); } [TestMethod] public void Attrib_attrib002_Test() { OutputHelper.WriteLine("Declare a basic attribute class, example from C# Language reference, 1.1"); - Assert.True(Attrib_TestClass_attrib002.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib002.testMethod()); } // Removing this test as not supported scenario in nano @@ -47,7 +47,7 @@ public void Attrib_attrib002_Test() //public void Attrib_attrib017_7a_Test() //{ // OutputHelper.WriteLine("17.4.5 test of conditional when DEBUG is undefined"); - // Assert.True(Attrib_TestClass_attrib017_7a.testMethod()); + // Assert.IsTrue(Attrib_TestClass_attrib017_7a.testMethod()); //} [TestMethod] @@ -55,21 +55,21 @@ public void Attrib_attrib017_8c_Test() { OutputHelper.WriteLine("17.4.5 - Example from CLR"); - Assert.True(Attrib_TestClass_attrib017_8c.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib017_8c.testMethod()); } [TestMethod] public void Attrib_attrib021_2_Test() { OutputHelper.WriteLine("CLR 17.4.9 - guid Attribute"); - Assert.True(Attrib_TestClass_attrib021_2.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib021_2.testMethod()); } [TestMethod] public void Attrib_attrib021_4_Test() { OutputHelper.WriteLine("CLR 17.4.9 - guid Attribute"); - Assert.True(Attrib_TestClass_attrib021_4.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib021_4.testMethod()); } [TestMethod] @@ -78,7 +78,7 @@ public void Attrib_attrib029_8_Test() OutputHelper.WriteLine("CLR 17.4.19 - obsolete"); OutputHelper.WriteLine("obsolete can be used on any declaration, but should be able to call"); OutputHelper.WriteLine("obsolete methods"); - Assert.True(Attrib_TestClass_attrib029_8.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib029_8.testMethod()); } [TestMethod] @@ -87,7 +87,7 @@ public void Attrib_attrib029_9_Test() OutputHelper.WriteLine("CLR 17.4.19 - obsolete"); OutputHelper.WriteLine("obsolete can be used on any declaration, but should be able to call"); OutputHelper.WriteLine("obsolete methods"); - Assert.True(Attrib_TestClass_attrib029_9.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib029_9.testMethod()); } [TestMethod] @@ -96,7 +96,7 @@ public void Attrib_attrib029_a_Test() OutputHelper.WriteLine("CLR 17.4.19 - obsolete"); OutputHelper.WriteLine("obsolete can be used on any declaration, but should be able to call"); OutputHelper.WriteLine("obsolete methods"); - Assert.True(Attrib_TestClass_attrib029_a.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib029_a.testMethod()); } [TestMethod] @@ -104,28 +104,28 @@ public void Attrib_attrib029_b_Test() { OutputHelper.WriteLine("CLR 17.4.19 - obsolete"); OutputHelper.WriteLine("obsolete can be used on any declaration, but overrides should generate warning"); - Assert.True(Attrib_TestClass_attrib029_b.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib029_b.testMethod()); } [TestMethod] public void Attrib_attrib031_4_Test() { OutputHelper.WriteLine("CLR 17.4.22 - serializable Attribute"); - Assert.True(Attrib_TestClass_attrib031_4.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib031_4.testMethod()); } [TestMethod] public void Attrib_attrib032_2_Test() { OutputHelper.WriteLine("CLR 17.4.23 - structlayout Attribute"); - Assert.True(Attrib_TestClass_attrib032_2.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib032_2.testMethod()); } [TestMethod] public void Attrib_attrib033_2_Test() { OutputHelper.WriteLine("Attribute usage is inherited."); - Assert.True(Attrib_TestClass_attrib033_2.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib033_2.testMethod()); } /* @@ -135,7 +135,7 @@ public void Attrib_attrib033_2_Test() public void Attrib_attrib035_12_Test() { OutputHelper.WriteLine("Make sure that assembly level GuidAttribute appears in assembly"); - Assert.True(Attrib_TestClass_attrib035_12.testMethod()) + Assert.IsTrue(Attrib_TestClass_attrib035_12.testMethod()) { return MFTestResults.Pass; } @@ -145,7 +145,7 @@ public void Attrib_attrib035_12_Test() public void Attrib_attrib035_22_Test() { OutputHelper.WriteLine("Make sure that assembly level GuidAttribute appears in assembly"); - Assert.True(Attrib_TestClass_attrib035_22.testMethod()) + Assert.IsTrue(Attrib_TestClass_attrib035_22.testMethod()) { return MFTestResults.Pass; } @@ -159,14 +159,14 @@ public void Attrib_attrib036_1_Test() OutputHelper.WriteLine("17.1 - A top-level, non-abstract attribute class must have public or"); OutputHelper.WriteLine("internal accessibility. Nested attribute classes may also be private,"); OutputHelper.WriteLine("protected, or protected internal."); - Assert.True(Attrib_TestClass_attrib036_1.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib036_1.testMethod()); } [TestMethod] public void Attrib_attrib038_1_Test() { OutputHelper.WriteLine("Verify params keyword"); - Assert.True(Attrib_TestClass_attrib038_1.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib038_1.testMethod()); } [TestMethod] @@ -178,7 +178,7 @@ public void Attrib_attrib047_4_Test() OutputHelper.WriteLine(" AttributeTargets.Method | AttributeTargets.Property |"); OutputHelper.WriteLine(" AttributeTargets.Field | AttributeTargets.Event |"); OutputHelper.WriteLine(" AttributeTargets.Interface | AttributeTargets.Delegate)]"); - Assert.True(Attrib_TestClass_attrib047_4.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib047_4.testMethod()); } [TestMethod] @@ -190,14 +190,14 @@ public void Attrib_attrib047_5_Test() OutputHelper.WriteLine(" AttributeTargets.Method | AttributeTargets.Property |"); OutputHelper.WriteLine(" AttributeTargets.Field | AttributeTargets.Event |"); OutputHelper.WriteLine(" AttributeTargets.Interface | AttributeTargets.Delegate)]"); - Assert.True(Attrib_TestClass_attrib047_5.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib047_5.testMethod()); } [TestMethod] public void Attrib_attrib049_4_Test() { OutputHelper.WriteLine("Bad named attribute argumements should be an error"); - Assert.True(Attrib_TestClass_attrib049_4.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib049_4.testMethod()); } [TestMethod] @@ -205,7 +205,7 @@ public void Attrib_attrib054_Test() { OutputHelper.WriteLine("ECMA complaince: support special attribute name binding rules with @ identifier"); OutputHelper.WriteLine("explictly specify attribute location with @"); - Assert.True(Attrib_TestClass_attrib054.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib054.testMethod()); } [TestMethod] @@ -214,7 +214,7 @@ public void Attrib_attrib062_Test() OutputHelper.WriteLine("Declare a derived attribute after declaring its base."); OutputHelper.WriteLine("Attributes can inherit from other attirubtes that have not yet been declared as long as there are no"); OutputHelper.WriteLine("circular dependencies."); - Assert.True(Attrib_TestClass_attrib062.testMethod()); + Assert.IsTrue(Attrib_TestClass_attrib062.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestBasicConcepts/NFUnitTestBasicConcepts.nfproj b/Tests/NFUnitTestBasicConcepts/NFUnitTestBasicConcepts.nfproj index dee2097c..318a10c7 100644 --- a/Tests/NFUnitTestBasicConcepts/NFUnitTestBasicConcepts.nfproj +++ b/Tests/NFUnitTestBasicConcepts/NFUnitTestBasicConcepts.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs b/Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs index 626a7c8b..29d8ec60 100644 --- a/Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs +++ b/Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs @@ -21,7 +21,7 @@ public void Basic_scope001_Test() OutputHelper.WriteLine("a namespace-member-declaration with no enclosing"); OutputHelper.WriteLine("namespace-declaration is the entire program text"); OutputHelper.WriteLine("of each compilation unit."); - Assert.True(Basic_TestClass_scope001.testMethod()); + Assert.IsTrue(Basic_TestClass_scope001.testMethod()); } [TestMethod] public void Basic_scope002_Test() @@ -33,7 +33,7 @@ public void Basic_scope002_Test() OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); OutputHelper.WriteLine("sequence of indentifiers as N."); - Assert.True(NS_Basic_TestClass_scope002.Basic_TestClass_scope002.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_scope002.Basic_TestClass_scope002.testMethod()); } [TestMethod] public void Basic_scope003_Test() @@ -45,7 +45,7 @@ public void Basic_scope003_Test() OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); OutputHelper.WriteLine("sequence of indentifiers as N."); - Assert.True(NS_Basic_TestClass_scope003.Basic_TestClass_scope003.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_scope003.Basic_TestClass_scope003.testMethod()); } [TestMethod] public void Basic_scope004_Test() @@ -57,7 +57,7 @@ public void Basic_scope004_Test() OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); OutputHelper.WriteLine("sequence of indentifiers as N."); - Assert.True(NS_Basic_TestClass_scope004.NS_Basic_TestClass_scope004_2.Basic_TestClass_scope004.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_scope004.NS_Basic_TestClass_scope004_2.Basic_TestClass_scope004.testMethod()); } [TestMethod] public void Basic_scope005_Test() @@ -69,7 +69,7 @@ public void Basic_scope005_Test() OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); OutputHelper.WriteLine("sequence of indentifiers as N."); - Assert.True(NS_Basic_TestClass_scope005.NS_Basic_TestClass_scope005_2.Basic_TestClass_scope005.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_scope005.NS_Basic_TestClass_scope005_2.Basic_TestClass_scope005.testMethod()); } [TestMethod] public void Basic_scope006_Test() @@ -81,7 +81,7 @@ public void Basic_scope006_Test() OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); OutputHelper.WriteLine("sequence of indentifiers as N."); - Assert.True(NS_Basic_TestClass_scope006.NS_Basic_TestClass_scope006_2.Basic_TestClass_scope006.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_scope006.NS_Basic_TestClass_scope006_2.Basic_TestClass_scope006.testMethod()); } [TestMethod] public void Basic_scope012_Test() @@ -91,7 +91,7 @@ public void Basic_scope012_Test() OutputHelper.WriteLine("extends over the namespace-member-declarations of the"); OutputHelper.WriteLine("compilation-unit or namespace-body in which the using-directive"); OutputHelper.WriteLine("occurs."); - Assert.True(NS_Basic_TestClass_scope012.Basic_TestClass_scope012.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_scope012.Basic_TestClass_scope012.testMethod()); } [TestMethod] public void Basic_scope019_Test() @@ -99,7 +99,7 @@ public void Basic_scope019_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a member declared by a class-member-declaration"); OutputHelper.WriteLine("is the class body in which the declaration occurs."); - Assert.True(Basic_TestClass_scope019.testMethod()); + Assert.IsTrue(Basic_TestClass_scope019.testMethod()); } [TestMethod] public void Basic_scope022_Test() @@ -110,7 +110,7 @@ public void Basic_scope022_Test() OutputHelper.WriteLine("the scope of a class member extends to the class-body of those"); OutputHelper.WriteLine("derived classes that are included in the accessibility domain"); OutputHelper.WriteLine("of the member."); - Assert.True(Basic_TestClass_scope022.testMethod()); + Assert.IsTrue(Basic_TestClass_scope022.testMethod()); } [TestMethod] public void Basic_scope023_Test() @@ -121,7 +121,7 @@ public void Basic_scope023_Test() OutputHelper.WriteLine("the scope of a class member extends to the class-body of those"); OutputHelper.WriteLine("derived classes that are included in the accessibility domain"); OutputHelper.WriteLine("of the member."); - Assert.True(Basic_TestClass_scope023.testMethod()); + Assert.IsTrue(Basic_TestClass_scope023.testMethod()); } [TestMethod] public void Basic_scope024_Test() @@ -132,7 +132,7 @@ public void Basic_scope024_Test() OutputHelper.WriteLine("the scope of a class member extends to the class-body of those"); OutputHelper.WriteLine("derived classes that are included in the accessibility domain"); OutputHelper.WriteLine("of the member."); - Assert.True(Basic_TestClass_scope024.testMethod()); + Assert.IsTrue(Basic_TestClass_scope024.testMethod()); } [TestMethod] public void Basic_scope025_Test() @@ -140,7 +140,7 @@ public void Basic_scope025_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a member declared by a struct-member-declaration"); OutputHelper.WriteLine("is the struct-body in which the declaration occurs."); - Assert.True(Basic_TestClass_scope025.testMethod()); + Assert.IsTrue(Basic_TestClass_scope025.testMethod()); } [TestMethod] public void Basic_scope027_Test() @@ -148,7 +148,7 @@ public void Basic_scope027_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a member declared by an enum-member-declaration"); OutputHelper.WriteLine("is the enum-body in which the declaration occurs."); - Assert.True(Basic_TestClass_scope027.testMethod()); + Assert.IsTrue(Basic_TestClass_scope027.testMethod()); } [TestMethod] public void Basic_scope029_Test() @@ -157,7 +157,7 @@ public void Basic_scope029_Test() OutputHelper.WriteLine("The scope of a parameter declared in a constructor-declaration"); OutputHelper.WriteLine("is the constructor-initializer and the block of that "); OutputHelper.WriteLine("constructor-declaration."); - Assert.True(Basic_TestClass_scope029.testMethod()); + Assert.IsTrue(Basic_TestClass_scope029.testMethod()); } [TestMethod] public void Basic_scope033_Test() @@ -165,7 +165,7 @@ public void Basic_scope033_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a parameter declared in a method-declaration"); OutputHelper.WriteLine("is the method-body of that method-declaration."); - Assert.True(Basic_TestClass_scope033.testMethod()); + Assert.IsTrue(Basic_TestClass_scope033.testMethod()); } [TestMethod] public void Basic_scope037_Test() @@ -173,7 +173,7 @@ public void Basic_scope037_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a parameter declared in an indexer-declaration"); OutputHelper.WriteLine("is the accessor-declarations of that indexer-declaration."); - Assert.True(Basic_TestClass_scope037.testMethod()); + Assert.IsTrue(Basic_TestClass_scope037.testMethod()); } [TestMethod] public void Basic_scope041_Test() @@ -181,7 +181,7 @@ public void Basic_scope041_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a parameter declared in an operator-declaration"); OutputHelper.WriteLine("is the block of that operator-declaration."); - Assert.True(Basic_TestClass_scope041.testMethod()); + Assert.IsTrue(Basic_TestClass_scope041.testMethod()); } [TestMethod] public void Basic_scope044_Test() @@ -191,7 +191,7 @@ public void Basic_scope044_Test() OutputHelper.WriteLine("is the block in which the declaration occurs. It is an error to refer to"); OutputHelper.WriteLine("a lcaol variable in a textual position that precedes the variable-declaratior"); OutputHelper.WriteLine("of the local variable."); - Assert.True(Basic_TestClass_scope044.testMethod()); + Assert.IsTrue(Basic_TestClass_scope044.testMethod()); } [TestMethod] public void Basic_scope051_Test() @@ -201,7 +201,7 @@ public void Basic_scope051_Test() OutputHelper.WriteLine("for statement is the for-initializer, the for-condition,"); OutputHelper.WriteLine("the for-iterator, and the contained statement of the for"); OutputHelper.WriteLine("statement."); - Assert.True(Basic_TestClass_scope051.testMethod()); + Assert.IsTrue(Basic_TestClass_scope051.testMethod()); } [TestMethod] public void Basic_scope053_Test() @@ -209,7 +209,7 @@ public void Basic_scope053_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a label declared in a label-statement"); OutputHelper.WriteLine("is the block in which the declaration occurs."); - Assert.True(Basic_TestClass_scope053.testMethod()); + Assert.IsTrue(Basic_TestClass_scope053.testMethod()); } [TestMethod] public void Basic_scope055_Test() @@ -217,7 +217,7 @@ public void Basic_scope055_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a label declared in a label-statement"); OutputHelper.WriteLine("is the block in which the declaration occurs."); - Assert.True(Basic_TestClass_scope055.testMethod()); + Assert.IsTrue(Basic_TestClass_scope055.testMethod()); } [TestMethod] public void Basic_scope056_Test() @@ -228,7 +228,7 @@ public void Basic_scope056_Test() OutputHelper.WriteLine("it is possible to refer to the member in "); OutputHelper.WriteLine("a textual position that precedes the "); OutputHelper.WriteLine("declaration of the member."); - Assert.True(NS_Basic_TestClass_scope056.Basic_TestClass_scope056.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_scope056.Basic_TestClass_scope056.testMethod()); } [TestMethod] public void Basic_scope057_Test() @@ -239,7 +239,7 @@ public void Basic_scope057_Test() OutputHelper.WriteLine("it is possible to refer to the member in "); OutputHelper.WriteLine("a textual position that precedes the "); OutputHelper.WriteLine("declaration of the member."); - Assert.True(Basic_TestClass_scope057.testMethod()); + Assert.IsTrue(Basic_TestClass_scope057.testMethod()); } [TestMethod] public void Basic_scope058_Test() @@ -250,7 +250,7 @@ public void Basic_scope058_Test() OutputHelper.WriteLine("it is possible to refer to the member in "); OutputHelper.WriteLine("a textual position that precedes the "); OutputHelper.WriteLine("declaration of the member."); - Assert.True(Basic_TestClass_scope058.testMethod()); + Assert.IsTrue(Basic_TestClass_scope058.testMethod()); } [TestMethod] public void Basic_scope059_Test() @@ -261,7 +261,7 @@ public void Basic_scope059_Test() OutputHelper.WriteLine("it is possible to refer to the member in "); OutputHelper.WriteLine("a textual position that precedes the "); OutputHelper.WriteLine("declaration of the member."); - Assert.True(Basic_TestClass_scope059.testMethod()); + Assert.IsTrue(Basic_TestClass_scope059.testMethod()); } [TestMethod] public void Basic_scope061_Test() @@ -271,7 +271,7 @@ public void Basic_scope061_Test() OutputHelper.WriteLine("error to refer to the local variable in a "); OutputHelper.WriteLine("textual position that precedes the"); OutputHelper.WriteLine("variable-declarator of the local variable."); - Assert.True(Basic_TestClass_scope061.testMethod()); + Assert.IsTrue(Basic_TestClass_scope061.testMethod()); } [TestMethod] public void Basic_scope062_Test() @@ -279,49 +279,49 @@ public void Basic_scope062_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The meaning of a name within a block may differ"); OutputHelper.WriteLine("based on the context in which the name is used."); - Assert.True(Basic_TestClass_scope062.testMethod()); + Assert.IsTrue(Basic_TestClass_scope062.testMethod()); } [TestMethod] public void Basic_scope063_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_scope063.testMethod()); + Assert.IsTrue(Basic_TestClass_scope063.testMethod()); } [TestMethod] public void Basic_scope064_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_scope064.testMethod()); + Assert.IsTrue(Basic_TestClass_scope064.testMethod()); } [TestMethod] public void Basic_scope067_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_scope067.testMethod()); + Assert.IsTrue(Basic_TestClass_scope067.testMethod()); } [TestMethod] public void Basic_scope068_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_scope068.testMethod()); + Assert.IsTrue(Basic_TestClass_scope068.testMethod()); } [TestMethod] public void Basic_scope069_Test() { OutputHelper.WriteLine("Section 3"); - Assert.True(Basic_TestClass_scope069.testMethod()); + Assert.IsTrue(Basic_TestClass_scope069.testMethod()); } [TestMethod] public void Basic_scope070_Test() { OutputHelper.WriteLine("Section 3"); - Assert.True(Basic_TestClass_scope070.testMethod()); + Assert.IsTrue(Basic_TestClass_scope070.testMethod()); } [TestMethod] public void Basic_scope071_Test() { OutputHelper.WriteLine("Section 3"); - Assert.True(Basic_TestClass_scope071.testMethod()); + Assert.IsTrue(Basic_TestClass_scope071.testMethod()); } [TestMethod] public void Basic_scope074_Test() @@ -329,7 +329,7 @@ public void Basic_scope074_Test() OutputHelper.WriteLine("Section 3.5"); OutputHelper.WriteLine("The scope of a label declared in a label-statement"); OutputHelper.WriteLine("is the block in which the declaration occurs."); - Assert.True(Basic_TestClass_scope074.testMethod()); + Assert.IsTrue(Basic_TestClass_scope074.testMethod()); } [TestMethod] public void Basic_nhide001_Test() @@ -342,7 +342,7 @@ public void Basic_nhide001_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide001.Basic_TestClass_nhide001.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide001.Basic_TestClass_nhide001.testMethod()); } [TestMethod] public void Basic_nhide002_Test() @@ -355,7 +355,7 @@ public void Basic_nhide002_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide002.Basic_TestClass_nhide002.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide002.Basic_TestClass_nhide002.testMethod()); } [TestMethod] public void Basic_nhide003_Test() @@ -368,7 +368,7 @@ public void Basic_nhide003_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide003.Basic_TestClass_nhide003.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide003.Basic_TestClass_nhide003.testMethod()); } [TestMethod] public void Basic_nhide004_Test() @@ -381,7 +381,7 @@ public void Basic_nhide004_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide004.Basic_TestClass_nhide004.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide004.Basic_TestClass_nhide004.testMethod()); } [TestMethod] public void Basic_nhide005_Test() @@ -394,7 +394,7 @@ public void Basic_nhide005_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide005.Basic_TestClass_nhide005.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide005.Basic_TestClass_nhide005.testMethod()); } [TestMethod] public void Basic_nhide006_Test() @@ -407,7 +407,7 @@ public void Basic_nhide006_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide006.Basic_TestClass_nhide006.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide006.Basic_TestClass_nhide006.testMethod()); } [TestMethod] public void Basic_nhide007_Test() @@ -420,7 +420,7 @@ public void Basic_nhide007_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide007.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide007.testMethod()); } [TestMethod] public void Basic_nhide008_Test() @@ -433,7 +433,7 @@ public void Basic_nhide008_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide008.Basic_TestClass_nhide008.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide008.Basic_TestClass_nhide008.testMethod()); } [TestMethod] public void Basic_nhide009_Test() @@ -446,7 +446,7 @@ public void Basic_nhide009_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide009.Basic_TestClass_nhide009.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide009.Basic_TestClass_nhide009.testMethod()); } [TestMethod] public void Basic_nhide010_Test() @@ -459,7 +459,7 @@ public void Basic_nhide010_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide010.Basic_TestClass_nhide010.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide010.Basic_TestClass_nhide010.testMethod()); } [TestMethod] public void Basic_nhide011_Test() @@ -472,7 +472,7 @@ public void Basic_nhide011_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide011.Basic_TestClass_nhide011.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide011.Basic_TestClass_nhide011.testMethod()); } [TestMethod] public void Basic_nhide012_Test() @@ -485,7 +485,7 @@ public void Basic_nhide012_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide012.Basic_TestClass_nhide012.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide012.Basic_TestClass_nhide012.testMethod()); } [TestMethod] public void Basic_nhide013_Test() @@ -498,7 +498,7 @@ public void Basic_nhide013_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(NS_Basic_TestClass_nhide013.Basic_TestClass_nhide013.testMethod()); + Assert.IsTrue(NS_Basic_TestClass_nhide013.Basic_TestClass_nhide013.testMethod()); } [TestMethod] public void Basic_nhide014_Test() @@ -511,7 +511,7 @@ public void Basic_nhide014_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide014.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide014.testMethod()); } [TestMethod] public void Basic_nhide015_Test() @@ -524,7 +524,7 @@ public void Basic_nhide015_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide015.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide015.testMethod()); } [TestMethod] public void Basic_nhide016_Test() @@ -537,7 +537,7 @@ public void Basic_nhide016_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide016.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide016.testMethod()); } [TestMethod] public void Basic_nhide017_Test() @@ -550,7 +550,7 @@ public void Basic_nhide017_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide017.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide017.testMethod()); } [TestMethod] public void Basic_nhide018_Test() @@ -563,7 +563,7 @@ public void Basic_nhide018_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide018.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide018.testMethod()); } [TestMethod] public void Basic_nhide019_Test() @@ -576,7 +576,7 @@ public void Basic_nhide019_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide019.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide019.testMethod()); } [TestMethod] public void Basic_nhide020_Test() @@ -589,7 +589,7 @@ public void Basic_nhide020_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide020.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide020.testMethod()); } [TestMethod] public void Basic_nhide021_Test() @@ -602,7 +602,7 @@ public void Basic_nhide021_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide021.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide021.testMethod()); } [TestMethod] public void Basic_nhide022_Test() @@ -615,7 +615,7 @@ public void Basic_nhide022_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide022.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide022.testMethod()); } [TestMethod] public void Basic_nhide023_Test() @@ -628,7 +628,7 @@ public void Basic_nhide023_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide023.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide023.testMethod()); } [TestMethod] public void Basic_nhide024_Test() @@ -641,7 +641,7 @@ public void Basic_nhide024_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide024.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide024.testMethod()); } [TestMethod] public void Basic_nhide025_Test() @@ -654,7 +654,7 @@ public void Basic_nhide025_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide025.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide025.testMethod()); } [TestMethod] public void Basic_nhide026_Test() @@ -667,7 +667,7 @@ public void Basic_nhide026_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide026.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide026.testMethod()); } [TestMethod] public void Basic_nhide027_Test() @@ -680,7 +680,7 @@ public void Basic_nhide027_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide027.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide027.testMethod()); } [TestMethod] public void Basic_nhide028_Test() @@ -693,7 +693,7 @@ public void Basic_nhide028_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide028.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide028.testMethod()); } [TestMethod] public void Basic_nhide029_Test() @@ -706,7 +706,7 @@ public void Basic_nhide029_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide029.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide029.testMethod()); } [TestMethod] public void Basic_nhide030_Test() @@ -719,7 +719,7 @@ public void Basic_nhide030_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide030.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide030.testMethod()); } [TestMethod] public void Basic_nhide031_Test() @@ -732,7 +732,7 @@ public void Basic_nhide031_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide031.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide031.testMethod()); } [TestMethod] public void Basic_nhide032_Test() @@ -745,7 +745,7 @@ public void Basic_nhide032_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide032.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide032.testMethod()); } [TestMethod] public void Basic_nhide033_Test() @@ -758,7 +758,7 @@ public void Basic_nhide033_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide033.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide033.testMethod()); } [TestMethod] public void Basic_nhide034_Test() @@ -771,7 +771,7 @@ public void Basic_nhide034_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide034.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide034.testMethod()); } [TestMethod] public void Basic_nhide035_Test() @@ -784,7 +784,7 @@ public void Basic_nhide035_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide035.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide035.testMethod()); } [TestMethod] public void Basic_nhide036_Test() @@ -797,7 +797,7 @@ public void Basic_nhide036_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide036.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide036.testMethod()); } [TestMethod] public void Basic_nhide037_Test() @@ -810,7 +810,7 @@ public void Basic_nhide037_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide037.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide037.testMethod()); } [TestMethod] public void Basic_nhide038_Test() @@ -823,7 +823,7 @@ public void Basic_nhide038_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide038.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide038.testMethod()); } [TestMethod] public void Basic_nhide039_Test() @@ -836,7 +836,7 @@ public void Basic_nhide039_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide039.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide039.testMethod()); } [TestMethod] public void Basic_nhide040_Test() @@ -849,7 +849,7 @@ public void Basic_nhide040_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide040.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide040.testMethod()); } [TestMethod] public void Basic_nhide041_Test() @@ -862,7 +862,7 @@ public void Basic_nhide041_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide041.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide041.testMethod()); } [TestMethod] public void Basic_nhide042_Test() @@ -875,7 +875,7 @@ public void Basic_nhide042_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide042.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide042.testMethod()); } [TestMethod] public void Basic_nhide043_Test() @@ -888,7 +888,7 @@ public void Basic_nhide043_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide043.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide043.testMethod()); } [TestMethod] public void Basic_nhide044_Test() @@ -901,7 +901,7 @@ public void Basic_nhide044_Test() OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); - Assert.True(Basic_TestClass_nhide044.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide044.testMethod()); } [TestMethod] public void Basic_nhide045_Test() @@ -910,7 +910,7 @@ public void Basic_nhide045_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide045.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide045.testMethod()); } [TestMethod] public void Basic_nhide047_Test() @@ -919,7 +919,7 @@ public void Basic_nhide047_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide047.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide047.testMethod()); } [TestMethod] public void Basic_nhide049_Test() @@ -928,7 +928,7 @@ public void Basic_nhide049_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide049.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide049.testMethod()); } [TestMethod] public void Basic_nhide050_Test() @@ -937,7 +937,7 @@ public void Basic_nhide050_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide050.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide050.testMethod()); } [TestMethod] public void Basic_nhide051_Test() @@ -946,7 +946,7 @@ public void Basic_nhide051_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide051.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide051.testMethod()); } [TestMethod] public void Basic_nhide053_Test() @@ -955,7 +955,7 @@ public void Basic_nhide053_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide053.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide053.testMethod()); } [TestMethod] public void Basic_nhide055_Test() @@ -964,7 +964,7 @@ public void Basic_nhide055_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide055.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide055.testMethod()); } [TestMethod] public void Basic_nhide056_Test() @@ -973,7 +973,7 @@ public void Basic_nhide056_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide056.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide056.testMethod()); } [TestMethod] public void Basic_nhide057_Test() @@ -982,7 +982,7 @@ public void Basic_nhide057_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide057.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide057.testMethod()); } [TestMethod] public void Basic_nhide059_Test() @@ -991,7 +991,7 @@ public void Basic_nhide059_Test() OutputHelper.WriteLine("When a name in an inner scope hides a name"); OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); OutputHelper.WriteLine("occurrences of that name."); - Assert.True(Basic_TestClass_nhide059.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide059.testMethod()); } [TestMethod] public void Basic_nhide061_Test() @@ -1000,7 +1000,7 @@ public void Basic_nhide061_Test() OutputHelper.WriteLine("A constant, field, property, event or type introduced"); OutputHelper.WriteLine("in a class or struct hides all base class members with the "); OutputHelper.WriteLine("same name."); - Assert.True(Basic_TestClass_nhide061.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide061.testMethod()); } [TestMethod] public void Basic_nhide062_Test() @@ -1009,7 +1009,7 @@ public void Basic_nhide062_Test() OutputHelper.WriteLine("A constant, field, property, event or type introduced"); OutputHelper.WriteLine("in a class or struct hides all base class members with the "); OutputHelper.WriteLine("same name."); - Assert.True(Basic_TestClass_nhide062.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide062.testMethod()); } [TestMethod] public void Basic_nhide063_Test() @@ -1018,7 +1018,7 @@ public void Basic_nhide063_Test() OutputHelper.WriteLine("A constant, field, property, event or type introduced"); OutputHelper.WriteLine("in a class or struct hides all base class members with the "); OutputHelper.WriteLine("same name."); - Assert.True(Basic_TestClass_nhide063.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide063.testMethod()); } [TestMethod] public void Basic_nhide064_Test() @@ -1027,7 +1027,7 @@ public void Basic_nhide064_Test() OutputHelper.WriteLine("A constant, field, property, event or type introduced"); OutputHelper.WriteLine("in a class or struct hides all base class members with the "); OutputHelper.WriteLine("same name."); - Assert.True(Basic_TestClass_nhide064.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide064.testMethod()); } [TestMethod] public void Basic_nhide067_Test() @@ -1036,7 +1036,7 @@ public void Basic_nhide067_Test() OutputHelper.WriteLine("A constant, field, property, event or type introduced"); OutputHelper.WriteLine("in a class or struct hides all base class members with the "); OutputHelper.WriteLine("same name."); - Assert.True(Basic_TestClass_nhide067.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide067.testMethod()); } [TestMethod] public void Basic_nhide068_Test() @@ -1045,7 +1045,7 @@ public void Basic_nhide068_Test() OutputHelper.WriteLine("A constant, field, property, event or type introduced"); OutputHelper.WriteLine("in a class or struct hides all base class members with the "); OutputHelper.WriteLine("same name."); - Assert.True(Basic_TestClass_nhide068.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide068.testMethod()); } [TestMethod] public void Basic_nhide071_Test() @@ -1056,7 +1056,7 @@ public void Basic_nhide071_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide071.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide071.testMethod()); } [TestMethod] public void Basic_nhide072_Test() @@ -1067,7 +1067,7 @@ public void Basic_nhide072_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide072.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide072.testMethod()); } [TestMethod] public void Basic_nhide075_Test() @@ -1078,7 +1078,7 @@ public void Basic_nhide075_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide075.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide075.testMethod()); } [TestMethod] public void Basic_nhide076_Test() @@ -1089,7 +1089,7 @@ public void Basic_nhide076_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide076.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide076.testMethod()); } [TestMethod] public void Basic_nhide077_Test() @@ -1100,7 +1100,7 @@ public void Basic_nhide077_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide077.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide077.testMethod()); } [TestMethod] public void Basic_nhide079_Test() @@ -1111,7 +1111,7 @@ public void Basic_nhide079_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide079.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide079.testMethod()); } [TestMethod] public void Basic_nhide081_Test() @@ -1122,7 +1122,7 @@ public void Basic_nhide081_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide081.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide081.testMethod()); } [TestMethod] public void Basic_nhide082_Test() @@ -1133,7 +1133,7 @@ public void Basic_nhide082_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide082.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide082.testMethod()); } [TestMethod] public void Basic_nhide085_Test() @@ -1144,7 +1144,7 @@ public void Basic_nhide085_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide085.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide085.testMethod()); } [TestMethod] public void Basic_nhide086_Test() @@ -1155,7 +1155,7 @@ public void Basic_nhide086_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide086.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide086.testMethod()); } [TestMethod] public void Basic_nhide087_Test() @@ -1166,7 +1166,7 @@ public void Basic_nhide087_Test() OutputHelper.WriteLine("the same name, and all base class methods"); OutputHelper.WriteLine("with the same signature (method name and"); OutputHelper.WriteLine("parameter count, modifiers, and types)."); - Assert.True(Basic_TestClass_nhide087.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide087.testMethod()); } [TestMethod] public void Basic_nhide088_Test() @@ -1180,7 +1180,7 @@ public void Basic_nhide088_Test() OutputHelper.WriteLine("This test passes in the baseline, but is an expected Fail"); OutputHelper.WriteLine("See bug 16852 for more details"); - Assert.True(Basic_TestClass_nhide088.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide088.testMethod()); } [TestMethod] public void Basic_nhide089_Test() @@ -1189,7 +1189,7 @@ public void Basic_nhide089_Test() OutputHelper.WriteLine("An indexer introduced in a class or a struct"); OutputHelper.WriteLine("hides all base class indexers with the same"); OutputHelper.WriteLine("signature (parameter count and types)."); - Assert.True(Basic_TestClass_nhide089.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide089.testMethod()); } [TestMethod] public void Basic_nhide090_Test() @@ -1198,7 +1198,7 @@ public void Basic_nhide090_Test() OutputHelper.WriteLine("An indexer introduced in a class or a struct"); OutputHelper.WriteLine("hides all base class indexers with the same"); OutputHelper.WriteLine("signature (parameter count and types)."); - Assert.True(Basic_TestClass_nhide090.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide090.testMethod()); } [TestMethod] public void Basic_nhide091_Test() @@ -1207,7 +1207,7 @@ public void Basic_nhide091_Test() OutputHelper.WriteLine("Contrary to hiding a name from an outer scope,"); OutputHelper.WriteLine("hding an accessible name from an inherited scope"); OutputHelper.WriteLine("causes a warning to be reported."); - Assert.True(Basic_TestClass_nhide091.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide091.testMethod()); } [TestMethod] public void Basic_nhide092_Test() @@ -1215,21 +1215,21 @@ public void Basic_nhide092_Test() OutputHelper.WriteLine("Section 3.5.1"); OutputHelper.WriteLine("A declaration of a new member hides an inherited"); OutputHelper.WriteLine("member only within the scope of the new member."); - Assert.True(Basic_TestClass_nhide092.testMethod()); + Assert.IsTrue(Basic_TestClass_nhide092.testMethod()); } [TestMethod] public void Basic_memac009_Test() { OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("Then, if M is public, the access is permitted."); - Assert.True(Basic_TestClass_memac009.testMethod()); + Assert.IsTrue(Basic_TestClass_memac009.testMethod()); } [TestMethod] public void Basic_memac010_Test() { OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("Then, if M is public, the access is permitted."); - Assert.True(Basic_TestClass_memac010.testMethod()); + Assert.IsTrue(Basic_TestClass_memac010.testMethod()); } [TestMethod] public void Basic_memac011_Test() @@ -1240,7 +1240,7 @@ public void Basic_memac011_Test() OutputHelper.WriteLine("M is declared, or if it occurs within a class derived "); OutputHelper.WriteLine("from the class in which M is declared and takes place "); OutputHelper.WriteLine("through the derived class type."); - Assert.True(Basic_TestClass_memac011.testMethod()); + Assert.IsTrue(Basic_TestClass_memac011.testMethod()); } [TestMethod] public void Basic_memac012_Test() @@ -1251,7 +1251,7 @@ public void Basic_memac012_Test() OutputHelper.WriteLine("M is declared, or if it occurs within a class derived "); OutputHelper.WriteLine("from the class in which M is declared and takes place "); OutputHelper.WriteLine("through the derived class type."); - Assert.True(Basic_TestClass_memac012.testMethod()); + Assert.IsTrue(Basic_TestClass_memac012.testMethod()); } /* * These tests were removed because they required additional files, they fail in the baseline @@ -1265,7 +1265,7 @@ public void Basic_memac013_Test() OutputHelper.WriteLine("M is declared, or if it occurs within a class derived "); OutputHelper.WriteLine("from the class in which M is declared and takes place "); OutputHelper.WriteLine("through the derived class type."); - Assert.True(Basic_TestClass_memac013.testMethod()) + Assert.IsTrue(Basic_TestClass_memac013.testMethod()) { return MFTestResults.Pass; } @@ -1280,7 +1280,7 @@ public void Basic_memac014_Test() OutputHelper.WriteLine("M is declared, or if it occurs within a class derived "); OutputHelper.WriteLine("from the class in which M is declared and takes place "); OutputHelper.WriteLine("through the derived class type."); - Assert.True(Basic_TestClass_memac014.testMethod()) + Assert.IsTrue(Basic_TestClass_memac014.testMethod()) { return MFTestResults.Pass; } @@ -1296,7 +1296,7 @@ public void Basic_memac019_Test() OutputHelper.WriteLine("if it occurs within a class derived from the class in"); OutputHelper.WriteLine("which M is delared and takes place through the derived class "); OutputHelper.WriteLine("type."); - Assert.True(Basic_TestClass_memac019.testMethod()); + Assert.IsTrue(Basic_TestClass_memac019.testMethod()); } [TestMethod] public void Basic_memac020_Test() @@ -1307,7 +1307,7 @@ public void Basic_memac020_Test() OutputHelper.WriteLine("if it occurs within a class derived from the class in"); OutputHelper.WriteLine("which M is delared and takes place through the derived class "); OutputHelper.WriteLine("type."); - Assert.True(Basic_TestClass_memac020.testMethod()); + Assert.IsTrue(Basic_TestClass_memac020.testMethod()); } [TestMethod] public void Basic_memac021_Test() @@ -1318,7 +1318,7 @@ public void Basic_memac021_Test() OutputHelper.WriteLine("if it occurs within a class derived from the class in"); OutputHelper.WriteLine("which M is delared and takes place through the derived class "); OutputHelper.WriteLine("type."); - Assert.True(Basic_TestClass_memac021.testMethod()); + Assert.IsTrue(Basic_TestClass_memac021.testMethod()); } [TestMethod] public void Basic_memac022_Test() @@ -1329,7 +1329,7 @@ public void Basic_memac022_Test() OutputHelper.WriteLine("if it occurs within a class derived from the class in"); OutputHelper.WriteLine("which M is delared and takes place through the derived class "); OutputHelper.WriteLine("type."); - Assert.True(Basic_TestClass_memac022.testMethod()); + Assert.IsTrue(Basic_TestClass_memac022.testMethod()); } [TestMethod] public void Basic_memac025_Test() @@ -1340,7 +1340,7 @@ public void Basic_memac025_Test() OutputHelper.WriteLine("if it occurs within a class derived from the class in"); OutputHelper.WriteLine("which M is delared and takes place through the derived class "); OutputHelper.WriteLine("type."); - Assert.True(Basic_TestClass_memac025.testMethod()); + Assert.IsTrue(Basic_TestClass_memac025.testMethod()); } [TestMethod] public void Basic_memac027_Test() @@ -1348,7 +1348,7 @@ public void Basic_memac027_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("Otherwise, if M is internal, the access is permitted"); OutputHelper.WriteLine("if it occurs within the project in which M is declared."); - Assert.True(Basic_TestClass_memac027.testMethod()); + Assert.IsTrue(Basic_TestClass_memac027.testMethod()); } [TestMethod] public void Basic_memac029_Test() @@ -1356,7 +1356,7 @@ public void Basic_memac029_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("Otherwise, if M is internal, the access is permitted"); OutputHelper.WriteLine("if it occurs within the project in which M is declared."); - Assert.True(Basic_TestClass_memac029.testMethod()); + Assert.IsTrue(Basic_TestClass_memac029.testMethod()); } [TestMethod] public void Basic_memac030_Test() @@ -1364,7 +1364,7 @@ public void Basic_memac030_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("Otherwise, if M is internal, the access is permitted"); OutputHelper.WriteLine("if it occurs within the project in which M is declared."); - Assert.True(Basic_TestClass_memac030.testMethod()); + Assert.IsTrue(Basic_TestClass_memac030.testMethod()); } [TestMethod] public void Basic_memac033_Test() @@ -1372,7 +1372,7 @@ public void Basic_memac033_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("Otherwise, if M is private, the access is permitted"); OutputHelper.WriteLine("if it occurs within the type in which M is declared."); - Assert.True(Basic_TestClass_memac033.testMethod()); + Assert.IsTrue(Basic_TestClass_memac033.testMethod()); } [TestMethod] public void Basic_memac034_Test() @@ -1380,7 +1380,7 @@ public void Basic_memac034_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("Otherwise, if M is private, the access is permitted"); OutputHelper.WriteLine("if it occurs within the type in which M is declared."); - Assert.True(Basic_TestClass_memac034.testMethod()); + Assert.IsTrue(Basic_TestClass_memac034.testMethod()); } /* @@ -1390,7 +1390,7 @@ public void Basic_memac034_Test() public void Basic_memac039_Test() { OutputHelper.WriteLine("VS Bug 75548"); - Assert.True(Basic_TestClass_memac039.testMethod()) + Assert.IsTrue(Basic_TestClass_memac039.testMethod()) { return MFTestResults.Pass; } @@ -1399,7 +1399,7 @@ public void Basic_memac039_Test() [TestMethod] public void Basic_memac041_Test() { - Assert.True(Basic_TestClass_memac041.testMethod()) + Assert.IsTrue(Basic_TestClass_memac041.testMethod()) { return MFTestResults.Pass; } @@ -1410,37 +1410,37 @@ public void Basic_memac041_Test() public void Basic_memac042_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_memac042.testMethod()); + Assert.IsTrue(Basic_TestClass_memac042.testMethod()); } [TestMethod] public void Basic_memac043_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_memac043.testMethod()); + Assert.IsTrue(Basic_TestClass_memac043.testMethod()); } [TestMethod] public void Basic_memac044_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_memac044.testMethod()); + Assert.IsTrue(Basic_TestClass_memac044.testMethod()); } [TestMethod] public void Basic_memac045_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_memac045.testMethod()); + Assert.IsTrue(Basic_TestClass_memac045.testMethod()); } [TestMethod] public void Basic_memac046_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_memac046.testMethod()); + Assert.IsTrue(Basic_TestClass_memac046.testMethod()); } [TestMethod] public void Basic_memac047_Test() { OutputHelper.WriteLine("Section 3.5"); - Assert.True(Basic_TestClass_memac047.testMethod()); + Assert.IsTrue(Basic_TestClass_memac047.testMethod()); } [TestMethod] public void Basic_accon001_Test() @@ -1448,7 +1448,7 @@ public void Basic_accon001_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon001.testMethod()); + Assert.IsTrue(Basic_TestClass_accon001.testMethod()); } [TestMethod] public void Basic_accon003_Test() @@ -1456,7 +1456,7 @@ public void Basic_accon003_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon003.testMethod()); + Assert.IsTrue(Basic_TestClass_accon003.testMethod()); } [TestMethod] public void Basic_accon005_Test() @@ -1464,7 +1464,7 @@ public void Basic_accon005_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon005.testMethod()); + Assert.IsTrue(Basic_TestClass_accon005.testMethod()); } [TestMethod] public void Basic_accon007_Test() @@ -1472,7 +1472,7 @@ public void Basic_accon007_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon007.testMethod()); + Assert.IsTrue(Basic_TestClass_accon007.testMethod()); } [TestMethod] public void Basic_accon009_Test() @@ -1480,7 +1480,7 @@ public void Basic_accon009_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon009.testMethod()); + Assert.IsTrue(Basic_TestClass_accon009.testMethod()); } [TestMethod] public void Basic_accon011_Test() @@ -1488,7 +1488,7 @@ public void Basic_accon011_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon011.testMethod()); + Assert.IsTrue(Basic_TestClass_accon011.testMethod()); } [TestMethod] public void Basic_accon013_Test() @@ -1496,7 +1496,7 @@ public void Basic_accon013_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon013.testMethod()); + Assert.IsTrue(Basic_TestClass_accon013.testMethod()); } [TestMethod] public void Basic_accon015_Test() @@ -1504,7 +1504,7 @@ public void Basic_accon015_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon015.testMethod()); + Assert.IsTrue(Basic_TestClass_accon015.testMethod()); } [TestMethod] public void Basic_accon019_Test() @@ -1512,7 +1512,7 @@ public void Basic_accon019_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon019.testMethod()); + Assert.IsTrue(Basic_TestClass_accon019.testMethod()); } [TestMethod] public void Basic_accon021_Test() @@ -1520,7 +1520,7 @@ public void Basic_accon021_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The direct base class of a class type must be"); OutputHelper.WriteLine("at least as accessible as the class type itself."); - Assert.True(Basic_TestClass_accon021.testMethod()); + Assert.IsTrue(Basic_TestClass_accon021.testMethod()); } [TestMethod] public void Basic_accon023_Test() @@ -1529,7 +1529,7 @@ public void Basic_accon023_Test() OutputHelper.WriteLine("The explicit base interfaces of an interface "); OutputHelper.WriteLine("type must be at least as accessible as the interface"); OutputHelper.WriteLine("type itself."); - Assert.True(Basic_TestClass_accon023.testMethod()); + Assert.IsTrue(Basic_TestClass_accon023.testMethod()); } [TestMethod] public void Basic_accon025_Test() @@ -1538,7 +1538,7 @@ public void Basic_accon025_Test() OutputHelper.WriteLine("The explicit base interfaces of an interface "); OutputHelper.WriteLine("type must be at least as accessible as the interface"); OutputHelper.WriteLine("type itself."); - Assert.True(Basic_TestClass_accon025.testMethod()); + Assert.IsTrue(Basic_TestClass_accon025.testMethod()); } [TestMethod] public void Basic_accon027_Test() @@ -1547,7 +1547,7 @@ public void Basic_accon027_Test() OutputHelper.WriteLine("The explicit base interfaces of an interface "); OutputHelper.WriteLine("type must be at least as accessible as the interface"); OutputHelper.WriteLine("type itself."); - Assert.True(Basic_TestClass_accon027.testMethod()); + Assert.IsTrue(Basic_TestClass_accon027.testMethod()); } [TestMethod] public void Basic_accon029_Test() @@ -1556,7 +1556,7 @@ public void Basic_accon029_Test() OutputHelper.WriteLine("The explicit base interfaces of an interface "); OutputHelper.WriteLine("type must be at least as accessible as the interface"); OutputHelper.WriteLine("type itself."); - Assert.True(Basic_TestClass_accon029.testMethod()); + Assert.IsTrue(Basic_TestClass_accon029.testMethod()); } [TestMethod] public void Basic_accon031_Test() @@ -1565,7 +1565,7 @@ public void Basic_accon031_Test() OutputHelper.WriteLine("The explicit base interfaces of an interface "); OutputHelper.WriteLine("type must be at least as accessible as the interface"); OutputHelper.WriteLine("type itself."); - Assert.True(Basic_TestClass_accon031.testMethod()); + Assert.IsTrue(Basic_TestClass_accon031.testMethod()); } [TestMethod] public void Basic_accon033_Test() @@ -1574,7 +1574,7 @@ public void Basic_accon033_Test() OutputHelper.WriteLine("The return type and parameter types of a delegate"); OutputHelper.WriteLine("type must be at least as accessible as the delegate"); OutputHelper.WriteLine("ytpe itself."); - Assert.True(Basic_TestClass_accon033.testMethod()); + Assert.IsTrue(Basic_TestClass_accon033.testMethod()); } [TestMethod] public void Basic_accon035_Test() @@ -1583,7 +1583,7 @@ public void Basic_accon035_Test() OutputHelper.WriteLine("The return type and parameter types of a delegate"); OutputHelper.WriteLine("type must be at least as accessible as the delegate"); OutputHelper.WriteLine("ytpe itself."); - Assert.True(Basic_TestClass_accon035.testMethod()); + Assert.IsTrue(Basic_TestClass_accon035.testMethod()); } [TestMethod] public void Basic_accon037_Test() @@ -1591,7 +1591,7 @@ public void Basic_accon037_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The type of a constant must be at least as"); OutputHelper.WriteLine("accessible as the constant itself."); - Assert.True(Basic_TestClass_accon037.testMethod()); + Assert.IsTrue(Basic_TestClass_accon037.testMethod()); } [TestMethod] public void Basic_accon039_Test() @@ -1599,7 +1599,7 @@ public void Basic_accon039_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The type of a field must be at least as accessible"); OutputHelper.WriteLine("as the field itself."); - Assert.True(Basic_TestClass_accon039.testMethod()); + Assert.IsTrue(Basic_TestClass_accon039.testMethod()); } [TestMethod] public void Basic_accon041_Test() @@ -1607,7 +1607,7 @@ public void Basic_accon041_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The return type and parameter types of a method"); OutputHelper.WriteLine("must be at least asaccessible as the method itself."); - Assert.True(Basic_TestClass_accon041.testMethod()); + Assert.IsTrue(Basic_TestClass_accon041.testMethod()); } [TestMethod] public void Basic_accon043_Test() @@ -1615,7 +1615,7 @@ public void Basic_accon043_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The return type and parameter types of a method"); OutputHelper.WriteLine("must be at least asaccessible as the method itself."); - Assert.True(Basic_TestClass_accon043.testMethod()); + Assert.IsTrue(Basic_TestClass_accon043.testMethod()); } [TestMethod] public void Basic_accon045_Test() @@ -1623,7 +1623,7 @@ public void Basic_accon045_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The type of a property must be at least as"); OutputHelper.WriteLine("accessible as the property itself."); - Assert.True(Basic_TestClass_accon045.testMethod()); + Assert.IsTrue(Basic_TestClass_accon045.testMethod()); } [TestMethod] public void Basic_accon047_Test() @@ -1632,7 +1632,7 @@ public void Basic_accon047_Test() OutputHelper.WriteLine("The return type and parameter types of an"); OutputHelper.WriteLine("indexer must be at least as accessible as the"); OutputHelper.WriteLine("indexer itself."); - Assert.True(Basic_TestClass_accon047.testMethod()); + Assert.IsTrue(Basic_TestClass_accon047.testMethod()); } [TestMethod] public void Basic_accon049_Test() @@ -1641,7 +1641,7 @@ public void Basic_accon049_Test() OutputHelper.WriteLine("The return type and parameter types of an"); OutputHelper.WriteLine("indexer must be at least as accessible as the"); OutputHelper.WriteLine("indexer itself."); - Assert.True(Basic_TestClass_accon049.testMethod()); + Assert.IsTrue(Basic_TestClass_accon049.testMethod()); } [TestMethod] public void Basic_accon051_Test() @@ -1650,7 +1650,7 @@ public void Basic_accon051_Test() OutputHelper.WriteLine("The return type and parameter types of an"); OutputHelper.WriteLine("operator must be at least as accessible as"); OutputHelper.WriteLine("the operator itself."); - Assert.True(Basic_TestClass_accon051.testMethod()); + Assert.IsTrue(Basic_TestClass_accon051.testMethod()); } [TestMethod] public void Basic_accon053_Test() @@ -1659,7 +1659,7 @@ public void Basic_accon053_Test() OutputHelper.WriteLine("The return type and parameter types of an"); OutputHelper.WriteLine("operator must be at least as accessible as"); OutputHelper.WriteLine("the operator itself."); - Assert.True(Basic_TestClass_accon053.testMethod()); + Assert.IsTrue(Basic_TestClass_accon053.testMethod()); } [TestMethod] public void Basic_accon055_Test() @@ -1667,7 +1667,7 @@ public void Basic_accon055_Test() OutputHelper.WriteLine("Section 3.3"); OutputHelper.WriteLine("The parameter types of a constructor must be at least"); OutputHelper.WriteLine("as accessible as the constructor itself."); - Assert.True(Basic_TestClass_accon055.testMethod()); + Assert.IsTrue(Basic_TestClass_accon055.testMethod()); } class Basic_TestClass_scope001 diff --git a/Tests/NFUnitTestBitConverter/BitConverter.cs b/Tests/NFUnitTestBitConverter/BitConverter.cs index da2f50c4..d345b348 100644 --- a/Tests/NFUnitTestBitConverter/BitConverter.cs +++ b/Tests/NFUnitTestBitConverter/BitConverter.cs @@ -587,9 +587,9 @@ public void BitConverterTest_ToStringEmpty() { var empty = new byte[] { }; - Assert.Equal(BitConverter.ToString(empty), string.Empty); - Assert.Equal(BitConverter.ToString(empty, 0), string.Empty); - Assert.Equal(BitConverter.ToString(empty, 0, 0), string.Empty); + Assert.AreEqual(BitConverter.ToString(empty), string.Empty); + Assert.AreEqual(BitConverter.ToString(empty, 0), string.Empty); + Assert.AreEqual(BitConverter.ToString(empty, 0, 0), string.Empty); } [TestMethod] diff --git a/Tests/NFUnitTestBitConverter/NFUnitTestBitConverter.nfproj b/Tests/NFUnitTestBitConverter/NFUnitTestBitConverter.nfproj index 5f874d18..f331e43d 100644 --- a/Tests/NFUnitTestBitConverter/NFUnitTestBitConverter.nfproj +++ b/Tests/NFUnitTestBitConverter/NFUnitTestBitConverter.nfproj @@ -35,7 +35,7 @@ - + @@ -45,6 +45,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestClasses/NFUnitTestClasses.nfproj b/Tests/NFUnitTestClasses/NFUnitTestClasses.nfproj index d25132cc..8597d268 100644 --- a/Tests/NFUnitTestClasses/NFUnitTestClasses.nfproj +++ b/Tests/NFUnitTestClasses/NFUnitTestClasses.nfproj @@ -45,7 +45,7 @@ - + @@ -55,6 +55,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestClasses/UnitTestConstructorTest.cs b/Tests/NFUnitTestClasses/UnitTestConstructorTest.cs index 917bbdae..15f1c3d9 100644 --- a/Tests/NFUnitTestClasses/UnitTestConstructorTest.cs +++ b/Tests/NFUnitTestClasses/UnitTestConstructorTest.cs @@ -18,7 +18,7 @@ public class UnitTestConstructorTest public void Constructors1_Test() { OutputHelper.WriteLine("Tests if assignments in a constructor function."); - Assert.True(ConstructorsTestClass1.testMethod()); + Assert.IsTrue(ConstructorsTestClass1.testMethod()); } [TestMethod] @@ -26,7 +26,7 @@ public void Constructors2_Test() { //Ported from Const2.cs OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is public."); - Assert.True(ConstructorsTestClass2.testMethod()); + Assert.IsTrue(ConstructorsTestClass2.testMethod()); } [TestMethod] @@ -34,7 +34,7 @@ public void Constructors3_Test() { //Ported from Const3.cs OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is protected."); - Assert.True(ConstructorsTestClass3.testMethod()); + Assert.IsTrue(ConstructorsTestClass3.testMethod()); } [TestMethod] @@ -42,7 +42,7 @@ public void Constructors5_Test() { //Ported from Const5.cs OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is internal."); - Assert.True(ConstructorsTestClass5.testMethod()); + Assert.IsTrue(ConstructorsTestClass5.testMethod()); } [TestMethod] @@ -50,7 +50,7 @@ public void Constructors6_Test() { //Ported from Const6.cs OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is private."); - Assert.True(ConstructorsTestClass6.testMethod()); + Assert.IsTrue(ConstructorsTestClass6.testMethod()); } [TestMethod] @@ -58,7 +58,7 @@ public void Constructors8_Test() { //Ported from Const8.cs OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor has one parameter."); - Assert.True(ConstructorsTestClass8.testMethod()); + Assert.IsTrue(ConstructorsTestClass8.testMethod()); } [TestMethod] @@ -68,7 +68,7 @@ public void Constructors10_Test() OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is called with one parameter"); OutputHelper.WriteLine("and is overloaded with an un-called zero parameter version"); - Assert.True(ConstructorsTestClass10.testMethod()); + Assert.IsTrue(ConstructorsTestClass10.testMethod()); } [TestMethod] @@ -76,7 +76,7 @@ public void Constructors11_Test() { //Ported from Const11.cs OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor has two parameters."); - Assert.True(ConstructorsTestClass11.testMethod()); + Assert.IsTrue(ConstructorsTestClass11.testMethod()); } [TestMethod] @@ -84,7 +84,7 @@ public void Constructors13_Test() { //Ported from Const13.cs OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor has ten parameters."); - Assert.True(ConstructorsTestClass13.testMethod()); + Assert.IsTrue(ConstructorsTestClass13.testMethod()); } [TestMethod] @@ -94,7 +94,7 @@ public void Constructors16_Test() OutputHelper.WriteLine("Tests if assignments in a constructor function, when test class inherits constructor"); OutputHelper.WriteLine("and extends it with base"); - Assert.True(ConstructorsTestClass16.testMethod()); + Assert.IsTrue(ConstructorsTestClass16.testMethod()); } [TestMethod] @@ -103,7 +103,7 @@ public void Constructors17_Test() //Ported from Const17.cs OutputHelper.WriteLine("Tests if assignments in a constructor function, when test class inherits 2 constructors"); OutputHelper.WriteLine("and extends one of them with base"); - Assert.True(ConstructorsTestClass17.testMethod()); + Assert.IsTrue(ConstructorsTestClass17.testMethod()); } [TestMethod] @@ -111,7 +111,7 @@ public void Constructors20_Test() { //Ported from Const20.cs OutputHelper.WriteLine("Tests if assignments in a constructor and its base are both functional"); - Assert.True(ConstructorsTestClass20.testMethod()); + Assert.IsTrue(ConstructorsTestClass20.testMethod()); } [TestMethod] @@ -119,7 +119,7 @@ public void Constructors21_Test() { //Ported from Const21.cs OutputHelper.WriteLine("Tests if assignments in a constructor and its base, and its base's base are all functional"); - Assert.True(ConstructorsTestClass21.testMethod()); + Assert.IsTrue(ConstructorsTestClass21.testMethod()); } [TestMethod] @@ -128,7 +128,7 @@ public void Constructors22_Test() //Ported from Const22.cs OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a parametered constructor extends"); OutputHelper.WriteLine("a not-parametered one with 'this'"); - Assert.True(ConstructorsTestClass22.testMethod()); + Assert.IsTrue(ConstructorsTestClass22.testMethod()); } [TestMethod] @@ -137,7 +137,7 @@ public void Constructors23_Test() //Ported from Const23.cs OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a not-parametered constructor extends"); OutputHelper.WriteLine("a parametered one with 'this'"); - Assert.True(ConstructorsTestClass23.testMethod()); + Assert.IsTrue(ConstructorsTestClass23.testMethod()); } [TestMethod] @@ -145,7 +145,7 @@ public void Constructors24_Test() { //Ported from Const24.cs OutputHelper.WriteLine("Tests if assignments in all a class' constructors are functional in a chain of extension using 'this'"); - Assert.True(ConstructorsTestClass24.testMethod()); + Assert.IsTrue(ConstructorsTestClass24.testMethod()); } [TestMethod] @@ -155,7 +155,7 @@ public void Constructors25_Test() OutputHelper.WriteLine("Tests if assignments in all a class' constructors are functional when a parametered one extends a"); OutputHelper.WriteLine("not-parametered one, which in turn extends the class' base class constructor"); - Assert.True(ConstructorsTestClass25.testMethod()); + Assert.IsTrue(ConstructorsTestClass25.testMethod()); } [TestMethod] @@ -164,7 +164,7 @@ public void Constructors26_Test() //Ported from Const26.cs OutputHelper.WriteLine("Tests if assignments in all a class' constructors are functional when a not-parametered one extends a"); OutputHelper.WriteLine("not-parametered one in its base class, which in turn extends a parametered one in the base class"); - Assert.True(ConstructorsTestClass26.testMethod()); + Assert.IsTrue(ConstructorsTestClass26.testMethod()); } [TestMethod] @@ -173,7 +173,7 @@ public void Constructors27_Test() //Ported from Const27.cs OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a two-parametered constructor extends"); OutputHelper.WriteLine("a one-parametered one with 'this'"); - Assert.True(ConstructorsTestClass27.testMethod()); + Assert.IsTrue(ConstructorsTestClass27.testMethod()); } [TestMethod] @@ -182,7 +182,7 @@ public void Constructors28_Test() //Ported from Const28.cs OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a two-parametered constructor extends"); OutputHelper.WriteLine("a one-parametered one with 'this' and calls that constructor with a static arg"); - Assert.True(ConstructorsTestClass28.testMethod()); + Assert.IsTrue(ConstructorsTestClass28.testMethod()); } [TestMethod] @@ -191,7 +191,7 @@ public void Constructors31_Test() //Ported from Const31.cs OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a not-parametered constructor extends"); OutputHelper.WriteLine("a two-parametered one with 'this'"); - Assert.True(ConstructorsTestClass31.testMethod()); + Assert.IsTrue(ConstructorsTestClass31.testMethod()); } [TestMethod] @@ -201,7 +201,7 @@ public void Constructors32_Test() OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a parametered constructor extends"); OutputHelper.WriteLine("a not-parametered one that is private with 'this'"); - Assert.True(ConstructorsTestClass32.testMethod()); + Assert.IsTrue(ConstructorsTestClass32.testMethod()); } [TestMethod] @@ -210,7 +210,7 @@ public void Constructors33_Test() //Ported from Const33.cs OutputHelper.WriteLine("Tests if assignments in a class' constructor are functional when the constructor is static"); - Assert.True(ConstructorsTestClass33.testMethod()); + Assert.IsTrue(ConstructorsTestClass33.testMethod()); } [TestMethod] @@ -219,7 +219,7 @@ public void Constructors34_Test() //Ported from Const34.cs OutputHelper.WriteLine("Tests if assignments in a class' constructor are functional when one constructor is static"); OutputHelper.WriteLine("and the other isn't"); - Assert.True(ConstructorsTestClass34.testMethod()); + Assert.IsTrue(ConstructorsTestClass34.testMethod()); } [TestMethod] @@ -227,7 +227,7 @@ public void Constructors35_Test() { //From Bug# 16354/16719 OutputHelper.WriteLine("Tests if handled exceptions in constructors continues execution"); - Assert.True(ConstructorsTestClass35.testMethod()); + Assert.IsTrue(ConstructorsTestClass35.testMethod()); } [TestMethod] @@ -239,7 +239,7 @@ public void Constructors44_Test() OutputHelper.WriteLine("is not possible for other classes to derive from"); OutputHelper.WriteLine("the class or create instances of the class (an System.Exception"); OutputHelper.WriteLine("being classes nested within the class)."); - Assert.True(ConstructorsTestClass44.testMethod()); + Assert.IsTrue(ConstructorsTestClass44.testMethod()); } [TestMethod] @@ -250,7 +250,7 @@ public void Constructors45_Test() OutputHelper.WriteLine("It is possible to construct circular dependencies that"); OutputHelper.WriteLine("allow static fields with variable initializers to be"); OutputHelper.WriteLine("observed in their default value state."); - Assert.True(ConstructorsTestClass45.testMethod()); + Assert.IsTrue(ConstructorsTestClass45.testMethod()); } //We initialize static constructors on load rather when enumerated, so order is not guaranteed (unlike desktop) @@ -263,7 +263,7 @@ public void Constructors45_Test() // OutputHelper.WriteLine("It is possible to construct circular dependencies that"); // OutputHelper.WriteLine("allow static fields with variable initializers to be"); // OutputHelper.WriteLine("observed in their default value state."); - // Assert.True(ConstructorsTestClass46.testMethod()) + // Assert.IsTrue(ConstructorsTestClass46.testMethod()) // { // return MFTestResults.Pass; // } @@ -279,7 +279,7 @@ public void Constructors45_Test() // OutputHelper.WriteLine("allow static fields with variable initializers to be"); // OutputHelper.WriteLine("observed in their default value state."); // OutputHelper.WriteLine("This test is expected to fail."); - // Assert.True(ConstructorsTestClass47.testMethod()) + // Assert.IsTrue(ConstructorsTestClass47.testMethod()) // { // return MFTestResults.Fail; // } @@ -295,7 +295,7 @@ public void Constructors50_Test() OutputHelper.WriteLine("constructor initializer of that declaration."); OutputHelper.WriteLine("Thus, a constructor initializer is permitted to"); OutputHelper.WriteLine("access the parameters of the constructor."); - Assert.True(ConstructorsTestClass50.testMethod()); + Assert.IsTrue(ConstructorsTestClass50.testMethod()); } [TestMethod] @@ -308,7 +308,7 @@ public void Constructors51_Test() OutputHelper.WriteLine("constructor initializer of that declaration."); OutputHelper.WriteLine("Thus, a constructor initializer is permitted to"); OutputHelper.WriteLine("access the parameters of the constructor."); - Assert.True(ConstructorsTestClass51.testMethod()); + Assert.IsTrue(ConstructorsTestClass51.testMethod()); } [TestMethod] @@ -316,7 +316,7 @@ public void Constructors52_Test() { OutputHelper.WriteLine("Testing a constructor with a '(params int[] values)' prototype, called with 3 ints"); //Ported from Const52.cs - Assert.True(ConstructorsTestClass52.testMethod()); + Assert.IsTrue(ConstructorsTestClass52.testMethod()); } [TestMethod] @@ -324,7 +324,7 @@ public void Constructors54_Test() { //Ported from Const54.cs OutputHelper.WriteLine("Testing a constructor with a '(params int[] values)' prototype, called with 3 ints from its derived class"); - Assert.True(ConstructorsTestClass54.testMethod()); + Assert.IsTrue(ConstructorsTestClass54.testMethod()); } [TestMethod] @@ -334,7 +334,7 @@ public void Constructors55_Test() OutputHelper.WriteLine("Testing a constructor with a '(params int[] values)' prototype, called with 3 ints"); OutputHelper.WriteLine(" from its derived class, and both constructors are 'protected internal'"); - Assert.True(ConstructorsTestClass55.testMethod()); + Assert.IsTrue(ConstructorsTestClass55.testMethod()); } [TestMethod] @@ -343,7 +343,7 @@ public void Constructors56_Test() OutputHelper.WriteLine("Testing a constructor with a '(params int[] values)' prototype, called with 3 ints"); OutputHelper.WriteLine(" from its derived class implicitly, and both constructors are 'internal'"); //Ported from Const56.cs - Assert.True(ConstructorsTestClass56.testMethod()); + Assert.IsTrue(ConstructorsTestClass56.testMethod()); } [TestMethod] @@ -351,7 +351,7 @@ public void Constructors57_Test() { //Ported from Const57.cs OutputHelper.WriteLine("Testing a 'private' constructor with a '(params int[] values)' prototype, called with 3 ints"); - Assert.True(ConstructorsTestClass57.testMethod()); + Assert.IsTrue(ConstructorsTestClass57.testMethod()); } [TestMethod] @@ -359,7 +359,7 @@ public void Constructors64_Test() { //Ported from Const64.cs OutputHelper.WriteLine("Instance constructors, destructors, and static constructors are not inherited"); - Assert.True(ConstructorsTestClass64.testMethod()); + Assert.IsTrue(ConstructorsTestClass64.testMethod()); } [TestMethod] @@ -369,11 +369,11 @@ public void ConstructorName_01() ConstructorInfo[] constructors = classToTest.GetConstructors(); - Assert.Equal(3, constructors.Length, $"Expecting 3 constructors, got {constructors.Length}."); + Assert.AreEqual(3, constructors.Length, $"Expecting 3 constructors, got {constructors.Length}."); foreach (ConstructorInfo constructorInfo in constructors) { - Assert.Equal(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); + Assert.AreEqual(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); } } @@ -384,11 +384,11 @@ public void ConstructorName_02() ConstructorInfo[] constructors = classToTest.GetConstructors(); - Assert.Equal(1, constructors.Length, $"Expecting 1 constructor, got {constructors.Length}."); + Assert.AreEqual(1, constructors.Length, $"Expecting 1 constructor, got {constructors.Length}."); foreach (ConstructorInfo constructorInfo in constructors) { - Assert.Equal(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); + Assert.AreEqual(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); } } @@ -400,7 +400,7 @@ public void ConstructorName_03() ConstructorInfo[] constructors = classToTest.GetConstructors(); - Assert.Equal(0, constructors.Length, $"Didn't expecting any constructor, got {constructors.Length}."); + Assert.AreEqual(0, constructors.Length, $"Didn't expecting any constructor, got {constructors.Length}."); } [TestMethod] @@ -411,7 +411,7 @@ public void ConstructorName_04() ConstructorInfo[] constructors = classToTest.GetConstructors(); - Assert.Equal(0, constructors.Length, $"Didn't expecting any constructor, got {constructors.Length}."); + Assert.AreEqual(0, constructors.Length, $"Didn't expecting any constructor, got {constructors.Length}."); } [TestMethod] @@ -422,7 +422,7 @@ public void ConstructorName_05() ConstructorInfo[] constructors = classToTest.GetConstructors(); - Assert.Equal(0, constructors.Length, $"Didn't expecting any constructor, got {constructors.Length}."); + Assert.AreEqual(0, constructors.Length, $"Didn't expecting any constructor, got {constructors.Length}."); } [TestMethod] @@ -433,11 +433,11 @@ public void ConstructorName_06() ConstructorInfo[] constructors = classToTest.GetConstructors(); - Assert.Equal(1, constructors.Length, $"Expecting 1 constructor, got {constructors.Length}."); + Assert.AreEqual(1, constructors.Length, $"Expecting 1 constructor, got {constructors.Length}."); foreach (ConstructorInfo constructorInfo in constructors) { - Assert.Equal(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); + Assert.AreEqual(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); } } @@ -449,11 +449,11 @@ public void ConstructorName_07() ConstructorInfo[] constructors = classToTest.GetConstructors(); - Assert.Equal(1, constructors.Length, $"Expecting 1 constructor, got {constructors.Length}."); + Assert.AreEqual(1, constructors.Length, $"Expecting 1 constructor, got {constructors.Length}."); foreach (ConstructorInfo constructorInfo in constructors) { - Assert.Equal(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); + Assert.AreEqual(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); } } @@ -465,11 +465,11 @@ public void ConstructorName_08() ConstructorInfo[] constructors = classToTest.GetConstructors(); - Assert.Equal(1, constructors.Length, $"Expecting 1 constructor, got {constructors.Length}."); + Assert.AreEqual(1, constructors.Length, $"Expecting 1 constructor, got {constructors.Length}."); foreach (ConstructorInfo constructorInfo in constructors) { - Assert.Equal(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); + Assert.AreEqual(constructorInfo.Name, ".ctor", $"Expecting '.ctor' as constructor name, but got: {constructorInfo.Name}"); } } @@ -484,24 +484,24 @@ public void ConstructorParametersInfo_01() ParameterInfo[] constructorParameters = constructors[0].GetParameters(); OutputHelper.WriteLine("Checking parameters for 1st constructor of ClassWith3Constructors"); - Assert.Equal(0, constructorParameters.Length, $"Expecting no parameters, got {constructorParameters.Length}."); + Assert.AreEqual(0, constructorParameters.Length, $"Expecting no parameters, got {constructorParameters.Length}."); // get ParameterInfo for 2nd constructor constructorParameters = constructors[1].GetParameters(); - Assert.Equal(1, constructorParameters.Length, $"Expecting 1 parameter, got {constructorParameters.Length}."); + Assert.AreEqual(1, constructorParameters.Length, $"Expecting 1 parameter, got {constructorParameters.Length}."); OutputHelper.WriteLine("Checking parameters for 2nd constructor of ClassWith3Constructors"); - Assert.Equal(constructorParameters[0].ParameterType.ToString(), $"{typeof(int)}", $"Expecting parameter of type {typeof(int)}, got {constructorParameters[0].ParameterType}."); + Assert.AreEqual(constructorParameters[0].ParameterType.ToString(), $"{typeof(int)}", $"Expecting parameter of type {typeof(int)}, got {constructorParameters[0].ParameterType}."); // get ParameterInfo for 3rd constructor constructorParameters = constructors[2].GetParameters(); - Assert.Equal(2, constructorParameters.Length, $"Expecting 2 parameters, got {constructorParameters.Length}."); + Assert.AreEqual(2, constructorParameters.Length, $"Expecting 2 parameters, got {constructorParameters.Length}."); OutputHelper.WriteLine("Checking parameters for 3rd constructor of ClassWith3Constructors"); - Assert.Equal(constructorParameters[0].ParameterType.ToString(), $"{typeof(int)}", $"Expecting parameter of type {typeof(int)}, got {constructorParameters[0].ParameterType}."); - Assert.Equal(constructorParameters[1].ParameterType.ToString(), $"{typeof(string)}", $"Expecting parameter of type {typeof(string)}, got {constructorParameters[0].ParameterType}."); + Assert.AreEqual(constructorParameters[0].ParameterType.ToString(), $"{typeof(int)}", $"Expecting parameter of type {typeof(int)}, got {constructorParameters[0].ParameterType}."); + Assert.AreEqual(constructorParameters[1].ParameterType.ToString(), $"{typeof(string)}", $"Expecting parameter of type {typeof(string)}, got {constructorParameters[0].ParameterType}."); } //Constructors Test Classes diff --git a/Tests/NFUnitTestClasses/UnitTestConstsTests.cs b/Tests/NFUnitTestClasses/UnitTestConstsTests.cs index 97286ec8..3e06bdb9 100644 --- a/Tests/NFUnitTestClasses/UnitTestConstsTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestConstsTests.cs @@ -23,7 +23,7 @@ public void Const1_Test() OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); OutputHelper.WriteLine("declared by the constant declaration."); - Assert.True(ConstTestClass1.test()); + Assert.IsTrue(ConstTestClass1.test()); } [TestMethod] @@ -35,7 +35,7 @@ public void Const2_Test() OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); OutputHelper.WriteLine("declared by the constant declaration."); - Assert.True(ConstTestClass2.test()); + Assert.IsTrue(ConstTestClass2.test()); } [TestMethod] @@ -47,7 +47,7 @@ public void Const3_Test() OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); OutputHelper.WriteLine("declared by the constant declaration."); - Assert.True(ConstTestClass3.test()); + Assert.IsTrue(ConstTestClass3.test()); } @@ -60,7 +60,7 @@ public void Const4_Test() OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); OutputHelper.WriteLine("declared by the constant declaration."); - Assert.True(ConstTestClass4.test()); + Assert.IsTrue(ConstTestClass4.test()); } [TestMethod] @@ -72,7 +72,7 @@ public void Const5_Test() OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); OutputHelper.WriteLine("declared by the constant declaration."); - Assert.True(ConstTestClass5.test()); + Assert.IsTrue(ConstTestClass5.test()); } [TestMethod] @@ -84,7 +84,7 @@ public void Const6_Test() OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); OutputHelper.WriteLine("declared by the constant declaration."); - Assert.True(ConstTestClass6.test()); + Assert.IsTrue(ConstTestClass6.test()); } @@ -97,7 +97,7 @@ public void Const9_Test() OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); OutputHelper.WriteLine("declared by the constant declaration."); - Assert.True(ConstTestClass9.test()); + Assert.IsTrue(ConstTestClass9.test()); } @@ -113,7 +113,7 @@ public void Const11_Test() OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); //Ported from const11.cs - Assert.True(ConstTestClass11.test()); + Assert.IsTrue(ConstTestClass11.test()); } [TestMethod] @@ -128,7 +128,7 @@ public void Const12_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass12.test()); + Assert.IsTrue(ConstTestClass12.test()); } [TestMethod] @@ -143,7 +143,7 @@ public void Const13_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass13.test()); + Assert.IsTrue(ConstTestClass13.test()); } [TestMethod] @@ -158,7 +158,7 @@ public void Const14_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass14.test()); + Assert.IsTrue(ConstTestClass14.test()); } [TestMethod] @@ -173,7 +173,7 @@ public void Const15_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass15.test()); + Assert.IsTrue(ConstTestClass15.test()); } [TestMethod] @@ -188,7 +188,7 @@ public void Const16_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass16.test()); + Assert.IsTrue(ConstTestClass16.test()); } [TestMethod] @@ -203,7 +203,7 @@ public void Const17_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass17.test()); + Assert.IsTrue(ConstTestClass17.test()); } [TestMethod] @@ -218,7 +218,7 @@ public void Const18_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass18.test()); + Assert.IsTrue(ConstTestClass18.test()); } [TestMethod] @@ -233,7 +233,7 @@ public void Const19_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass19.test()); + Assert.IsTrue(ConstTestClass19.test()); } [TestMethod] @@ -248,7 +248,7 @@ public void Const20_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass20.test()); + Assert.IsTrue(ConstTestClass20.test()); } [TestMethod] @@ -263,7 +263,7 @@ public void Const21_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass21.test()); + Assert.IsTrue(ConstTestClass21.test()); } [TestMethod] @@ -278,7 +278,7 @@ public void Const24_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass24.test()); + Assert.IsTrue(ConstTestClass24.test()); } [TestMethod] @@ -291,7 +291,7 @@ public void Const25_Test() OutputHelper.WriteLine("a constant-expression. Examples of such constructs include"); OutputHelper.WriteLine("case labels, goto case statements, enum member declarations,"); OutputHelper.WriteLine("attributes, and other constant declarations."); - Assert.True(ConstTestClass25.test()); + Assert.IsTrue(ConstTestClass25.test()); } [TestMethod] @@ -304,7 +304,7 @@ public void Const26_Test() OutputHelper.WriteLine("a constant-expression. Examples of such constructs include"); OutputHelper.WriteLine("case labels, goto case statements, enum member declarations,"); OutputHelper.WriteLine("attributes, and other constant declarations."); - Assert.True(ConstTestClass26.test()); + Assert.IsTrue(ConstTestClass26.test()); } [TestMethod] @@ -317,7 +317,7 @@ public void Const27_Test() OutputHelper.WriteLine("a constant-expression. Examples of such constructs include"); OutputHelper.WriteLine("case labels, goto case statements, enum member declarations,"); OutputHelper.WriteLine("attributes, and other constant declarations."); - Assert.True(ConstTestClass27.test()); + Assert.IsTrue(ConstTestClass27.test()); } [TestMethod] @@ -330,7 +330,7 @@ public void Const28_Test() OutputHelper.WriteLine("a constant-expression. Examples of such constructs include"); OutputHelper.WriteLine("case labels, goto case statements, enum member declarations,"); OutputHelper.WriteLine("attributes, and other constant declarations."); - Assert.True(ConstTestClass28.test()); + Assert.IsTrue(ConstTestClass28.test()); } [TestMethod] @@ -343,7 +343,7 @@ public void Const30_Test() OutputHelper.WriteLine("are not of a circular nature. The compiler automatically"); OutputHelper.WriteLine("arranges to evaluate the constant declarations in the"); OutputHelper.WriteLine("appropriate order."); - Assert.True(ConstTestClass30.test()); + Assert.IsTrue(ConstTestClass30.test()); } [TestMethod] @@ -358,7 +358,7 @@ public void Const32_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass32.test()); + Assert.IsTrue(ConstTestClass32.test()); } [TestMethod] @@ -373,7 +373,7 @@ public void Const33_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass33.test()); + Assert.IsTrue(ConstTestClass33.test()); } [TestMethod] @@ -388,7 +388,7 @@ public void Const34_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass34.test()); + Assert.IsTrue(ConstTestClass34.test()); } [TestMethod] @@ -403,7 +403,7 @@ public void Const35_Test() OutputHelper.WriteLine("must yield a value of the target type or of a "); OutputHelper.WriteLine("type that can be converted to the target type"); OutputHelper.WriteLine("by implicit conversion."); - Assert.True(ConstTestClass35.test()); + Assert.IsTrue(ConstTestClass35.test()); } [TestMethod] @@ -413,7 +413,7 @@ public void Const42_Test() OutputHelper.WriteLine("Section 10.3"); OutputHelper.WriteLine("A constant declarator introduces a new member"); OutputHelper.WriteLine("This test is expected to fail"); - Assert.False(ConstTestClass42.test()); + Assert.IsFalse(ConstTestClass42.test()); { OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 17246"); @@ -428,7 +428,7 @@ public void Const43_Test() OutputHelper.WriteLine("Section 10.3"); OutputHelper.WriteLine("A constant declarator introduces a new member"); OutputHelper.WriteLine("This test is expected to fail"); - Assert.False(ConstTestClass43.test()); + Assert.IsFalse(ConstTestClass43.test()); { OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 17246"); @@ -442,7 +442,7 @@ public void Const44_Test() //Ported from const44.cs OutputHelper.WriteLine("Section 10.3"); OutputHelper.WriteLine("The type of a constant must be at least as acccessible as the constant itself."); - Assert.True(ConstTestClass44.test()); + Assert.IsTrue(ConstTestClass44.test()); } @@ -453,7 +453,7 @@ public void Const56_Test() OutputHelper.WriteLine("Section 10.3"); OutputHelper.WriteLine("...the only possible value for constants of reference-types other than "); OutputHelper.WriteLine("string is null"); - Assert.True(ConstTestClass56.test()); + Assert.IsTrue(ConstTestClass56.test()); } [TestMethod] @@ -464,7 +464,7 @@ public void Const57_Test() OutputHelper.WriteLine("A constant declaration that declares multiple constants is equivalent to "); OutputHelper.WriteLine("multiple declarations of single constants with the same attributes, "); OutputHelper.WriteLine("modifiers, and type. "); - Assert.True(ConstTestClass57.test()); + Assert.IsTrue(ConstTestClass57.test()); } //Const test classes diff --git a/Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs b/Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs index 81e1b14e..28b50922 100644 --- a/Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs @@ -17,7 +17,7 @@ class UnitTestDeclarationTests public void BaseClass1_Test() { OutputHelper.WriteLine("Tests an int declaration with assignment in a base class"); - Assert.True(BaseClassTestClass1.testMethod()); + Assert.IsTrue(BaseClassTestClass1.testMethod()); } [TestMethod] @@ -26,7 +26,7 @@ public void BaseClass2_Test() OutputHelper.WriteLine("Tests a function declaration in a implementing class still"); OutputHelper.WriteLine("works after child is cast as an implemented interface"); - Assert.True(BaseClassTestClass2.testMethod()); + Assert.IsTrue(BaseClassTestClass2.testMethod()); } [TestMethod] @@ -35,7 +35,7 @@ public void BaseClass3_Test() OutputHelper.WriteLine("Tests a function declaration in an implementing class still works after child is cast as"); OutputHelper.WriteLine("each of two implemented interfaces"); - Assert.True(BaseClassTestClass3.testMethod()); + Assert.IsTrue(BaseClassTestClass3.testMethod()); } [TestMethod] @@ -43,7 +43,7 @@ public void BaseClass4_Test() { OutputHelper.WriteLine("Tests a function declaration in a child class still works after child is cast as"); OutputHelper.WriteLine("its parent class and an interface it implements"); - Assert.True(BaseClassTestClass4.testMethod()); + Assert.IsTrue(BaseClassTestClass4.testMethod()); } [TestMethod] @@ -54,7 +54,7 @@ public void BaseClass10_Test() OutputHelper.WriteLine("class and its base classes. In other words, the"); OutputHelper.WriteLine("set of base classes is the transitive closure of the "); OutputHelper.WriteLine("direct base class relatationship."); - Assert.True(BaseClassTestClass10.testMethod()); + Assert.IsTrue(BaseClassTestClass10.testMethod()); } [TestMethod] @@ -63,7 +63,7 @@ public void BaseClass13_Test() OutputHelper.WriteLine("Section 10.1"); OutputHelper.WriteLine("Note that a class does not depend on the"); OutputHelper.WriteLine("classes that are nested within it. "); - Assert.True(BaseClassTestClass13.testMethod()); + Assert.IsTrue(BaseClassTestClass13.testMethod()); } [TestMethod] @@ -71,7 +71,7 @@ public void BaseClass25_Test() { OutputHelper.WriteLine("10.1.2.1 "); OutputHelper.WriteLine("inheriting from nested types"); - Assert.True(BaseClassTestClass25.testMethod()); + Assert.IsTrue(BaseClassTestClass25.testMethod()); } [TestMethod] @@ -80,7 +80,7 @@ public void BaseClass29_Test() OutputHelper.WriteLine("10.1.2.1 "); OutputHelper.WriteLine("inheriting from nested types"); - Assert.True(BaseClassTestClass29.testMethod()); + Assert.IsTrue(BaseClassTestClass29.testMethod()); } [TestMethod] @@ -88,7 +88,7 @@ public void Modifiers2_Test() { OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'new' "); - Assert.True(ModifiersTestClass2.testMethod()); + Assert.IsTrue(ModifiersTestClass2.testMethod()); } [TestMethod] @@ -96,7 +96,7 @@ public void Modifiers3_Test() { OutputHelper.WriteLine("Testing a public int directly inside a public class"); - Assert.True(ModifiersTestClass3.testMethod()); + Assert.IsTrue(ModifiersTestClass3.testMethod()); } [TestMethod] @@ -104,7 +104,7 @@ public void Modifiers4_Test() { OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'public' "); - Assert.True(ModifiersTestClass4.testMethod()); + Assert.IsTrue(ModifiersTestClass4.testMethod()); } [TestMethod] @@ -112,7 +112,7 @@ public void Modifiers6_Test() { OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'protected' "); - Assert.True(ModifiersTestClass6.testMethod()); + Assert.IsTrue(ModifiersTestClass6.testMethod()); } [TestMethod] @@ -120,14 +120,14 @@ public void Modifiers7_Test() { OutputHelper.WriteLine("Testing a public int directly inside an internal class"); - Assert.True(ModifiersTestClass7.testMethod()); + Assert.IsTrue(ModifiersTestClass7.testMethod()); } [TestMethod] public void Modifiers8_Test() { OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'internal' "); - Assert.True(ModifiersTestClass8.testMethod()); + Assert.IsTrue(ModifiersTestClass8.testMethod()); } [TestMethod] @@ -135,7 +135,7 @@ public void Modifiers10_Test() { OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'private' "); - Assert.True(ModifiersTestClass10.testMethod()); + Assert.IsTrue(ModifiersTestClass10.testMethod()); } [TestMethod] @@ -143,7 +143,7 @@ public void Modifiers11_Test() { OutputHelper.WriteLine("Testing a public int inside an abstract class that is implemented"); - Assert.True(ModifiersTestClass11.testMethod()); + Assert.IsTrue(ModifiersTestClass11.testMethod()); } [TestMethod] @@ -151,14 +151,14 @@ public void Modifiers12_Test() { OutputHelper.WriteLine("Testing a public int inside an inner abstract class that is implemented"); - Assert.True(ModifiersTestClass12.testMethod()); + Assert.IsTrue(ModifiersTestClass12.testMethod()); } [TestMethod] public void Modifiers13_Test() { OutputHelper.WriteLine("Testing a public int directly inside a sealed class"); - Assert.True(ModifiersTestClass13.testMethod()); + Assert.IsTrue(ModifiersTestClass13.testMethod()); } [TestMethod] @@ -166,7 +166,7 @@ public void Modifiers14_Test() { OutputHelper.WriteLine("Testing a public int inside an inner sealed class"); - Assert.True(ModifiersTestClass14.testMethod()); + Assert.IsTrue(ModifiersTestClass14.testMethod()); } [TestMethod] @@ -179,7 +179,7 @@ public void Modifiers23_Test() OutputHelper.WriteLine("will necessarily either be null or contain references"); OutputHelper.WriteLine("to instances of non-abstract classes derived from the "); OutputHelper.WriteLine("abstract types."); - Assert.True(ModifiersTestClass23.testMethod()); + Assert.IsTrue(ModifiersTestClass23.testMethod()); } [TestMethod] @@ -192,7 +192,7 @@ public void Modifiers24_Test() OutputHelper.WriteLine("will necessarily either be null or contain references"); OutputHelper.WriteLine("to instances of non-abstract classes derived from the "); OutputHelper.WriteLine("abstract types."); - Assert.True(ModifiersTestClass24.testMethod()); + Assert.IsTrue(ModifiersTestClass24.testMethod()); } [TestMethod] @@ -201,7 +201,7 @@ public void Modifiers25_Test() OutputHelper.WriteLine("Section 10.1"); OutputHelper.WriteLine("An abstract class is permitted (but not required)"); OutputHelper.WriteLine("to contain abstract methods and accessors."); - Assert.True(ModifiersTestClass25.testMethod()); + Assert.IsTrue(ModifiersTestClass25.testMethod()); } [TestMethod] @@ -210,7 +210,7 @@ public void Modifiers26_Test() OutputHelper.WriteLine("Section 10.1"); OutputHelper.WriteLine("An abstract class is permitted (but not required)"); OutputHelper.WriteLine("to contain abstract methods and accessors."); - Assert.True(ModifiersTestClass26.testMethod()); + Assert.IsTrue(ModifiersTestClass26.testMethod()); } [TestMethod] @@ -224,7 +224,7 @@ public void Modifiers31_Test() OutputHelper.WriteLine("abstract methods and accessors. Such implementations"); OutputHelper.WriteLine("are provided by overriding the abstract methods"); OutputHelper.WriteLine("and accessors."); - Assert.True(ModifiersTestClass31.testMethod()); + Assert.IsTrue(ModifiersTestClass31.testMethod()); } class BaseClassTestClass1_Base diff --git a/Tests/NFUnitTestClasses/UnitTestDestructorTests.cs b/Tests/NFUnitTestClasses/UnitTestDestructorTests.cs index 4e84d9e3..22984d48 100644 --- a/Tests/NFUnitTestClasses/UnitTestDestructorTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestDestructorTests.cs @@ -24,7 +24,7 @@ class UnitTestDestructorTests // OutputHelper.WriteLine(" destruct the instances of a class."); // OutputHelper.WriteLine(""); // OutputHelper.WriteLine("Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs"); - // Assert.True(DestructorsTestClass3.testMethod()); + // Assert.IsTrue(DestructorsTestClass3.testMethod()); //} //[TestMethod] @@ -36,7 +36,7 @@ class UnitTestDestructorTests // OutputHelper.WriteLine(" destruct the instances of a class."); // OutputHelper.WriteLine(""); // OutputHelper.WriteLine("Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs"); - // Assert.True(DestructorsTestClass4.testMethod()); + // Assert.IsTrue(DestructorsTestClass4.testMethod()); //} // Removed as using a class out of mscorlib @@ -50,7 +50,7 @@ class UnitTestDestructorTests // OutputHelper.WriteLine(" actually declared in the class."); // OutputHelper.WriteLine(""); // OutputHelper.WriteLine("Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs"); - // Assert.True(DestructorsTestClass7.testMethod()); + // Assert.IsTrue(DestructorsTestClass7.testMethod()); //} //class DestructorsTestClass3 diff --git a/Tests/NFUnitTestClasses/UnitTestEventTests.cs b/Tests/NFUnitTestClasses/UnitTestEventTests.cs index c9745419..63a8da7c 100644 --- a/Tests/NFUnitTestClasses/UnitTestEventTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestEventTests.cs @@ -17,7 +17,7 @@ class UnitTestEventTests public void Events1_Test() { OutputHelper.WriteLine("This is testing an obsolete event structure, but should pass."); - Assert.True(EventsTestClass1.testMethod()); + Assert.IsTrue(EventsTestClass1.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestFieldTests.cs b/Tests/NFUnitTestClasses/UnitTestFieldTests.cs index 7258b5a6..f5a82332 100644 --- a/Tests/NFUnitTestClasses/UnitTestFieldTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestFieldTests.cs @@ -22,7 +22,7 @@ public void Fields1_testMethod() OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); OutputHelper.WriteLine(" members declared by the field-declaration."); - Assert.True(FieldsTestClass1.testMethod()); + Assert.IsTrue(FieldsTestClass1.testMethod()); } [TestMethod] @@ -34,7 +34,7 @@ public void Fields2_testMethod() OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); OutputHelper.WriteLine(" members declared by the field-declaration."); - Assert.True(FieldsTestClass2.testMethod()); + Assert.IsTrue(FieldsTestClass2.testMethod()); } [TestMethod] @@ -46,7 +46,7 @@ public void Fields3_testMethod() OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); OutputHelper.WriteLine(" members declared by the field-declaration."); - Assert.True(FieldsTestClass3.testMethod()); + Assert.IsTrue(FieldsTestClass3.testMethod()); } [TestMethod] @@ -58,7 +58,7 @@ public void Fields4_testMethod() OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); OutputHelper.WriteLine(" members declared by the field-declaration."); - Assert.True(FieldsTestClass4.testMethod()); + Assert.IsTrue(FieldsTestClass4.testMethod()); } [TestMethod] @@ -70,7 +70,7 @@ public void Fields5_testMethod() OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); OutputHelper.WriteLine(" members declared by the field-declaration."); - Assert.True(FieldsTestClass5.testMethod()); + Assert.IsTrue(FieldsTestClass5.testMethod()); } [TestMethod] @@ -82,7 +82,7 @@ public void Fields6_testMethod() OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); OutputHelper.WriteLine(" members declared by the field-declaration."); - Assert.True(FieldsTestClass6.testMethod()); + Assert.IsTrue(FieldsTestClass6.testMethod()); } [TestMethod] @@ -94,7 +94,7 @@ public void Fields7_testMethod() OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); OutputHelper.WriteLine(" members declared by the field-declaration."); - Assert.True(FieldsTestClass7.testMethod()); + Assert.IsTrue(FieldsTestClass7.testMethod()); } [TestMethod] @@ -106,7 +106,7 @@ public void Fields8_testMethod() OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); OutputHelper.WriteLine(" members declared by the field-declaration."); - Assert.True(FieldsTestClass8.testMethod()); + Assert.IsTrue(FieldsTestClass8.testMethod()); } [TestMethod] @@ -122,7 +122,7 @@ public void Fields13_testMethod() OutputHelper.WriteLine(" A field declaration that declares multiple fields"); OutputHelper.WriteLine(" is equivalent to multiple declarations of single "); OutputHelper.WriteLine(" fields with the same attributes, modifiers, and type."); - Assert.True(FieldsTestClass13.testMethod()); + Assert.IsTrue(FieldsTestClass13.testMethod()); } [TestMethod] @@ -132,7 +132,7 @@ public void Fields14_testMethod() OutputHelper.WriteLine(" A static field identifies exactly on storage location."); OutputHelper.WriteLine(" No matter how many instances of a class are created,"); OutputHelper.WriteLine(" there is only ever one copy of a static field."); - Assert.True(FieldsTestClass14.testMethod()); + Assert.IsTrue(FieldsTestClass14.testMethod()); } [TestMethod] @@ -143,7 +143,7 @@ public void Fields15_testMethod() OutputHelper.WriteLine(" type in which it is declared is loaded, and "); OutputHelper.WriteLine(" ceases to exist when the type in which it "); OutputHelper.WriteLine(" is declared in unloaded."); - Assert.True(FieldsTestClass15.testMethod()); + Assert.IsTrue(FieldsTestClass15.testMethod()); } [TestMethod] @@ -156,7 +156,7 @@ public void Fields16_testMethod() OutputHelper.WriteLine(" its class is created, and ceases to exist when there "); OutputHelper.WriteLine(" are no references to that instance and the destructor"); OutputHelper.WriteLine(" of the instance has executed."); - Assert.True(FieldsTestClass16.testMethod()); + Assert.IsTrue(FieldsTestClass16.testMethod()); } [TestMethod] @@ -169,7 +169,7 @@ public void Fields17_testMethod() OutputHelper.WriteLine(" its class is created, and ceases to exist when there "); OutputHelper.WriteLine(" are no references to that instance and the destructor"); OutputHelper.WriteLine(" of the instance has executed."); - Assert.True(FieldsTestClass17.testMethod()); + Assert.IsTrue(FieldsTestClass17.testMethod()); } [TestMethod] @@ -180,7 +180,7 @@ public void Fields18_testMethod() OutputHelper.WriteLine(" the form E.M, if M is a static field, E must denote"); OutputHelper.WriteLine(" a type, and if M is an instance field, E must "); OutputHelper.WriteLine(" denote an instance."); - Assert.True(FieldsTestClass18.testMethod()); + Assert.IsTrue(FieldsTestClass18.testMethod()); } [TestMethod] @@ -191,7 +191,7 @@ public void Fields20_testMethod() OutputHelper.WriteLine(" the form E.M, if M is a static field, E must denote"); OutputHelper.WriteLine(" a type, and if M is an instance field, E must "); OutputHelper.WriteLine(" denote an instance."); - Assert.True(FieldsTestClass20.testMethod()); + Assert.IsTrue(FieldsTestClass20.testMethod()); } [TestMethod] @@ -203,7 +203,7 @@ public void Fields22_testMethod() OutputHelper.WriteLine(" by the declaration can only occur as part of"); OutputHelper.WriteLine(" the declaration or in a constructor in the"); OutputHelper.WriteLine(" same class."); - Assert.True(FieldsTestClass22.testMethod()); + Assert.IsTrue(FieldsTestClass22.testMethod()); } [TestMethod] @@ -215,7 +215,7 @@ public void Fields23_testMethod() OutputHelper.WriteLine(" by the declaration can only occur as part of"); OutputHelper.WriteLine(" the declaration or in a constructor in the"); OutputHelper.WriteLine(" same class."); - Assert.True(FieldsTestClass23.testMethod()); + Assert.IsTrue(FieldsTestClass23.testMethod()); } [TestMethod] @@ -227,7 +227,7 @@ public void Fields24_testMethod() OutputHelper.WriteLine(" by the declaration can only occur as part of"); OutputHelper.WriteLine(" the declaration or in a constructor in the"); OutputHelper.WriteLine(" same class."); - Assert.True(FieldsTestClass24.testMethod()); + Assert.IsTrue(FieldsTestClass24.testMethod()); } [TestMethod] @@ -239,7 +239,7 @@ public void Fields41_testMethod() OutputHelper.WriteLine(" type of the value is not permitted in a const declaration"); OutputHelper.WriteLine(" or when the value cannot be computed at compile-time"); OutputHelper.WriteLine(" by a constant expression."); - Assert.True(FieldsTestClass41.testMethod()); + Assert.IsTrue(FieldsTestClass41.testMethod()); } [TestMethod] @@ -253,7 +253,7 @@ public void Fields42_testMethod() OutputHelper.WriteLine(" correspond to assignment statements that are executed"); OutputHelper.WriteLine(" when an instance of the class is created."); OutputHelper.WriteLine("This test has been rewritten to avoid use of the Math.Abs function which the MF does not support"); - Assert.True(FieldsTestClass42.testMethod()); + Assert.IsTrue(FieldsTestClass42.testMethod()); } [TestMethod] @@ -266,7 +266,7 @@ public void Fields43_testMethod() OutputHelper.WriteLine(" constructor of a class. The variable initializers"); OutputHelper.WriteLine(" are executed in the textual order they appear"); OutputHelper.WriteLine(" in the class declaration."); - Assert.True(FieldsTestClass43.testMethod()); + Assert.IsTrue(FieldsTestClass43.testMethod()); } [TestMethod] @@ -279,7 +279,7 @@ public void Fields44_testMethod() OutputHelper.WriteLine(" constructor of a class. The variable initializers"); OutputHelper.WriteLine(" are executed in the textual order they appear"); OutputHelper.WriteLine(" in the class declaration."); - Assert.True(FieldsTestClass44.testMethod()); + Assert.IsTrue(FieldsTestClass44.testMethod()); } [TestMethod] @@ -292,7 +292,7 @@ public void Fields45_testMethod() OutputHelper.WriteLine(" constructor of a class. The variable initializers"); OutputHelper.WriteLine(" are executed in the textual order they appear"); OutputHelper.WriteLine(" in the class declaration."); - Assert.True(FieldsTestClass45.testMethod()); + Assert.IsTrue(FieldsTestClass45.testMethod()); } [TestMethod] @@ -303,7 +303,7 @@ public void Fields46_testMethod() OutputHelper.WriteLine(" correspond to a sequence of assignments that are "); OutputHelper.WriteLine(" executed immediately upon entry to one of the instance"); OutputHelper.WriteLine(" constructors of the class."); - Assert.True(FieldsTestClass46.testMethod()); + Assert.IsTrue(FieldsTestClass46.testMethod()); } [TestMethod] @@ -315,7 +315,7 @@ public void Fields49_testMethod() OutputHelper.WriteLine(" variable initializer, as it is an error for"); OutputHelper.WriteLine(" a variable initialzer to reference any instance"); OutputHelper.WriteLine(" member through a simple-name."); - Assert.True(FieldsTestClass49.testMethod()); + Assert.IsTrue(FieldsTestClass49.testMethod()); } [TestMethod] @@ -331,7 +331,7 @@ public void Fields51_testMethod() OutputHelper.WriteLine(" class the contains the field declaration. These are also"); OutputHelper.WriteLine(" contexts in which it is valid to pass a readonly field"); OutputHelper.WriteLine(" as an out or ref parameter."); - Assert.True(FieldsTestClass51.testMethod()); + Assert.IsTrue(FieldsTestClass51.testMethod()); } [TestMethod] @@ -347,49 +347,49 @@ public void Fields52_testMethod() OutputHelper.WriteLine(" class the contains the field declaration. These are also"); OutputHelper.WriteLine(" contexts in which it is valid to pass a readonly field"); OutputHelper.WriteLine(" as an out or ref parameter."); - Assert.True(FieldsTestClass52.testMethod()); + Assert.IsTrue(FieldsTestClass52.testMethod()); } [TestMethod] public void Fields53_testMethod() { OutputHelper.WriteLine("Testing bools assigned with (x == y)"); - Assert.True(FieldsTestClass53.testMethod()); + Assert.IsTrue(FieldsTestClass53.testMethod()); } [TestMethod] public void Fields54_testMethod() { OutputHelper.WriteLine("Testing bools assigned with function calls"); - Assert.True(FieldsTestClass54.testMethod()); + Assert.IsTrue(FieldsTestClass54.testMethod()); } [TestMethod] public void Fields55_testMethod() { OutputHelper.WriteLine("Testing bools assigned with conditionals"); - Assert.True(FieldsTestClass55.testMethod()); + Assert.IsTrue(FieldsTestClass55.testMethod()); } [TestMethod] public void Fields56_testMethod() { OutputHelper.WriteLine("Testing ints assigned with function calls"); - Assert.True(FieldsTestClass56.testMethod()); + Assert.IsTrue(FieldsTestClass56.testMethod()); } [TestMethod] public void Fields57_testMethod() { OutputHelper.WriteLine("Testing strings assigned with \"x\" + \"y\""); - Assert.True(FieldsTestClass57.testMethod()); + Assert.IsTrue(FieldsTestClass57.testMethod()); } [TestMethod] public void Fields58_testMethod() { OutputHelper.WriteLine("Testing strings assigned with function calls"); - Assert.True(FieldsTestClass58.testMethod()); + Assert.IsTrue(FieldsTestClass58.testMethod()); } class FieldsTestClass1 diff --git a/Tests/NFUnitTestClasses/UnitTestIndexerTests.cs b/Tests/NFUnitTestClasses/UnitTestIndexerTests.cs index a876c3f2..3a09359c 100644 --- a/Tests/NFUnitTestClasses/UnitTestIndexerTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestIndexerTests.cs @@ -20,7 +20,7 @@ public void Indexers1_Test() OutputHelper.WriteLine(" An indexer-declaration may include set of"); OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); OutputHelper.WriteLine(" of the four access modifiers."); - Assert.True(IndexersTestClass1.testMethod()); + Assert.IsTrue(IndexersTestClass1.testMethod()); } [TestMethod] @@ -30,7 +30,7 @@ public void Indexers2_Test() OutputHelper.WriteLine(" An indexer-declaration may include set of"); OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); OutputHelper.WriteLine(" of the four access modifiers."); - Assert.True(IndexersTestClass2.testMethod()); + Assert.IsTrue(IndexersTestClass2.testMethod()); } [TestMethod] @@ -40,7 +40,7 @@ public void Indexers3_Test() OutputHelper.WriteLine(" An indexer-declaration may include set of"); OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); OutputHelper.WriteLine(" of the four access modifiers."); - Assert.True(IndexersTestClass3.testMethod()); + Assert.IsTrue(IndexersTestClass3.testMethod()); } @@ -51,7 +51,7 @@ public void Indexers4_Test() OutputHelper.WriteLine(" An indexer-declaration may include set of"); OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); OutputHelper.WriteLine(" of the four access modifiers."); - Assert.True(IndexersTestClass4.testMethod()); + Assert.IsTrue(IndexersTestClass4.testMethod()); } [TestMethod] @@ -61,7 +61,7 @@ public void Indexers5_Test() OutputHelper.WriteLine(" An indexer-declaration may include set of"); OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); OutputHelper.WriteLine(" of the four access modifiers."); - Assert.True(IndexersTestClass5.testMethod()); + Assert.IsTrue(IndexersTestClass5.testMethod()); } [TestMethod] @@ -71,7 +71,7 @@ public void Indexers6_Test() OutputHelper.WriteLine(" An indexer-declaration may include set of"); OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); OutputHelper.WriteLine(" of the four access modifiers."); - Assert.True(IndexersTestClass6.testMethod()); + Assert.IsTrue(IndexersTestClass6.testMethod()); } [TestMethod] @@ -81,7 +81,7 @@ public void Indexers10_Test() OutputHelper.WriteLine(" An indexer-declaration may include set of"); OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); OutputHelper.WriteLine(" of the four access modifiers."); - Assert.True(IndexersTestClass10.testMethod()); + Assert.IsTrue(IndexersTestClass10.testMethod()); } [TestMethod] @@ -91,7 +91,7 @@ public void Indexers11_Test() OutputHelper.WriteLine(" An indexer-declaration may include set of"); OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); OutputHelper.WriteLine(" of the four access modifiers."); - Assert.True(IndexersTestClass11.testMethod()); + Assert.IsTrue(IndexersTestClass11.testMethod()); } [TestMethod] @@ -101,7 +101,7 @@ public void Indexers12_Test() OutputHelper.WriteLine(" The type on an indexer declaration specifies"); OutputHelper.WriteLine(" the element type of the indexer introduced"); OutputHelper.WriteLine(" by the declaration"); - Assert.True(IndexersTestClass12.testMethod()); + Assert.IsTrue(IndexersTestClass12.testMethod()); } [TestMethod] @@ -114,7 +114,7 @@ public void Indexers14_Test() OutputHelper.WriteLine(" followed by an interface-type, a . and the "); OutputHelper.WriteLine(" keyword this."); OutputHelper.WriteLine("This is currently an expected fail, but is resolved in 3.0 see Bug 16341 for details"); - Assert.True(IndexersTestClass14.testMethod()); + Assert.IsTrue(IndexersTestClass14.testMethod()); } [TestMethod] @@ -128,7 +128,7 @@ public void Indexers18_Test() OutputHelper.WriteLine(" one parameter must be specified, and that the"); OutputHelper.WriteLine(" ref and out parameter modifiers are not"); OutputHelper.WriteLine(" permitted."); - Assert.True(IndexersTestClass18.testMethod()); + Assert.IsTrue(IndexersTestClass18.testMethod()); } [TestMethod] @@ -139,7 +139,7 @@ public void Indexers23_Test() OutputHelper.WriteLine(" of the types referenced in the formal-index"); OutputHelper.WriteLine(" parameter list must be at least as accessible"); OutputHelper.WriteLine(" as the indexer itself."); - Assert.True(IndexersTestClass23.testMethod()); + Assert.IsTrue(IndexersTestClass23.testMethod()); } [TestMethod] @@ -152,7 +152,7 @@ public void Indexers29_Test() OutputHelper.WriteLine(" types of its formal parameters. The element type"); OutputHelper.WriteLine(" is not a part of an index signature, nor are the"); OutputHelper.WriteLine(" names of the formal parameters."); - Assert.True(IndexersTestClass29.testMethod()); + Assert.IsTrue(IndexersTestClass29.testMethod()); } [TestMethod] @@ -165,7 +165,7 @@ public void Indexers32_Test() OutputHelper.WriteLine(" types of its formal parameters. The element type"); OutputHelper.WriteLine(" is not a part of an index signature, nor are the"); OutputHelper.WriteLine(" names of the formal parameters."); - Assert.True(IndexersTestClass32.testMethod()); + Assert.IsTrue(IndexersTestClass32.testMethod()); } [TestMethod] @@ -178,7 +178,7 @@ public void Indexers33_Test() OutputHelper.WriteLine(" types of its formal parameters. The element type"); OutputHelper.WriteLine(" is not a part of an index signature, nor are the"); OutputHelper.WriteLine(" names of the formal parameters."); - Assert.True(IndexersTestClass33.testMethod()); + Assert.IsTrue(IndexersTestClass33.testMethod()); } [TestMethod] @@ -188,7 +188,7 @@ public void Indexers37_Test() OutputHelper.WriteLine(" With these differences in mind, all rules"); OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); OutputHelper.WriteLine(" accessors as well as property accessors."); - Assert.True(IndexersTestClass37.testMethod()); + Assert.IsTrue(IndexersTestClass37.testMethod()); } [TestMethod] @@ -198,7 +198,7 @@ public void Indexers38_Test() OutputHelper.WriteLine(" With these differences in mind, all rules"); OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); OutputHelper.WriteLine(" accessors as well as property accessors."); - Assert.True(IndexersTestClass38.testMethod()); + Assert.IsTrue(IndexersTestClass38.testMethod()); } [TestMethod] public void Indexers39_Test() @@ -207,7 +207,7 @@ public void Indexers39_Test() OutputHelper.WriteLine(" With these differences in mind, all rules"); OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); OutputHelper.WriteLine(" accessors as well as property accessors."); - Assert.True(IndexersTestClass39.testMethod()); + Assert.IsTrue(IndexersTestClass39.testMethod()); } [TestMethod] @@ -217,7 +217,7 @@ public void Indexers42_Test() OutputHelper.WriteLine(" With these differences in mind, all rules"); OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); OutputHelper.WriteLine(" accessors as well as property accessors."); - Assert.True(IndexersTestClass42.testMethod()); + Assert.IsTrue(IndexersTestClass42.testMethod()); } [TestMethod] @@ -227,49 +227,49 @@ public void Indexers43_Test() OutputHelper.WriteLine(" With these differences in mind, all rules"); OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); OutputHelper.WriteLine(" accessors as well as property accessors."); - Assert.True(IndexersTestClass43.testMethod()); + Assert.IsTrue(IndexersTestClass43.testMethod()); } [TestMethod] public void Indexers46_Test() { OutputHelper.WriteLine("Testing multiple comma seperated indexers"); - Assert.True(IndexersTestClass46.testMethod()); + Assert.IsTrue(IndexersTestClass46.testMethod()); } [TestMethod] public void Indexers47_Test() { OutputHelper.WriteLine("Testing multiple comma seperated indexers to a public variable"); - Assert.True(IndexersTestClass47.testMethod()); + Assert.IsTrue(IndexersTestClass47.testMethod()); } [TestMethod] public void Indexers48_Test() { OutputHelper.WriteLine("Testing multiple comma seperated indexers with a protected internal get and set"); - Assert.True(IndexersTestClass48.testMethod()); + Assert.IsTrue(IndexersTestClass48.testMethod()); } [TestMethod] public void Indexers49_Test() { OutputHelper.WriteLine("Testing multiple comma seperated indexers with an internal get and set"); - Assert.True(IndexersTestClass49.testMethod()); + Assert.IsTrue(IndexersTestClass49.testMethod()); } [TestMethod] public void Indexers50_Test() { OutputHelper.WriteLine("Testing multiple comma seperated indexers with a private get and set"); - Assert.True(IndexersTestClass50.testMethod()); + Assert.IsTrue(IndexersTestClass50.testMethod()); } [TestMethod] public void Indexers51_Test() { OutputHelper.WriteLine("Testing multiple comma seperated indexers with a public virtual get and set"); - Assert.True(IndexersTestClass51.testMethod()); + Assert.IsTrue(IndexersTestClass51.testMethod()); } [TestMethod] @@ -277,28 +277,28 @@ public void Indexers52_Test() { OutputHelper.WriteLine("Testing multiple comma seperated indexers with an overridden public virtual get and set"); OutputHelper.WriteLine("This test is expected to fail"); - Assert.False(IndexersTestClass52.testMethod()); + Assert.IsFalse(IndexersTestClass52.testMethod()); } [TestMethod] public void Indexers53_Test() { OutputHelper.WriteLine("Testing multiple comma seperated indexers with an overridden public abstract get and set"); - Assert.True(IndexersTestClass53.testMethod()); + Assert.IsTrue(IndexersTestClass53.testMethod()); } [TestMethod] public void Indexers55_Test() { OutputHelper.WriteLine("Testing 10 explicitly specified indexers"); - Assert.True(IndexersTestClass55.testMethod()); + Assert.IsTrue(IndexersTestClass55.testMethod()); } [TestMethod] public void Indexers56_Test() { OutputHelper.WriteLine("Testing a single indexers with an overridden public abstract get"); - Assert.True(IndexersTestClass56.testMethod()); + Assert.IsTrue(IndexersTestClass56.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestMembersTests.cs b/Tests/NFUnitTestClasses/UnitTestMembersTests.cs index 141e54a0..eb163a14 100644 --- a/Tests/NFUnitTestClasses/UnitTestMembersTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestMembersTests.cs @@ -16,7 +16,7 @@ public void Members23_Test() OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); OutputHelper.WriteLine(" hides the inherited member)."); - Assert.True(MembersTestClass023.testMethod()); + Assert.IsTrue(MembersTestClass023.testMethod()); } [TestMethod] @@ -28,7 +28,7 @@ public void Members24_Test() OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); OutputHelper.WriteLine(" hides the inherited member)."); - Assert.True(MembersTestClass024.testMethod()); + Assert.IsTrue(MembersTestClass024.testMethod()); } [TestMethod] @@ -40,7 +40,7 @@ public void Members25_Test() OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); OutputHelper.WriteLine(" hides the inherited member)."); - Assert.True(MembersTestClass025.testMethod()); + Assert.IsTrue(MembersTestClass025.testMethod()); } [TestMethod] @@ -52,7 +52,7 @@ public void Members26_Test() OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); OutputHelper.WriteLine(" hides the inherited member)."); - Assert.True(MembersTestClass026.testMethod()); + Assert.IsTrue(MembersTestClass026.testMethod()); } [TestMethod] @@ -64,7 +64,7 @@ public void Members27_Test() OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); OutputHelper.WriteLine(" hides the inherited member)."); - Assert.True(MembersTestClass027.testMethod()); + Assert.IsTrue(MembersTestClass027.testMethod()); } [TestMethod] @@ -76,7 +76,7 @@ public void Members28_Test() OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); OutputHelper.WriteLine(" hides the inherited member)."); - Assert.True(MembersTestClass028.testMethod()); + Assert.IsTrue(MembersTestClass028.testMethod()); } //Test Case Calls @@ -87,7 +87,7 @@ public void MembersInheritance001_Test() OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); OutputHelper.WriteLine(" members declared in B as well as the members"); - Assert.True(MembersInheritanceTestClass001.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass001.testMethod()); } [TestMethod] public void MembersInheritance002_Test() @@ -96,7 +96,7 @@ public void MembersInheritance002_Test() OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); OutputHelper.WriteLine(" members declared in B as well as the members"); - Assert.True(MembersInheritanceTestClass002.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass002.testMethod()); } [TestMethod] public void MembersInheritance003_Test() @@ -105,7 +105,7 @@ public void MembersInheritance003_Test() OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); OutputHelper.WriteLine(" members declared in B as well as the members"); - Assert.True(MembersInheritanceTestClass003.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass003.testMethod()); } [TestMethod] public void MembersInheritance004_Test() @@ -114,7 +114,7 @@ public void MembersInheritance004_Test() OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); OutputHelper.WriteLine(" members declared in B as well as the members"); - Assert.True(MembersInheritanceTestClass004.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass004.testMethod()); } [TestMethod] public void MembersInheritance005_Test() @@ -123,7 +123,7 @@ public void MembersInheritance005_Test() OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); OutputHelper.WriteLine(" members declared in B as well as the members"); - Assert.True(MembersInheritanceTestClass005.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass005.testMethod()); } [TestMethod] public void MembersInheritance006_Test() @@ -132,7 +132,7 @@ public void MembersInheritance006_Test() OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); OutputHelper.WriteLine(" members declared in B as well as the members"); - Assert.True(MembersInheritanceTestClass006.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass006.testMethod()); } [TestMethod] public void MembersInheritance007_Test() @@ -141,7 +141,7 @@ public void MembersInheritance007_Test() OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); OutputHelper.WriteLine(" members declared in B as well as the members"); - Assert.True(MembersInheritanceTestClass007.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass007.testMethod()); } [TestMethod] public void MembersInheritance008_Test() @@ -150,7 +150,7 @@ public void MembersInheritance008_Test() OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); OutputHelper.WriteLine(" members declared in B as well as the members"); - Assert.True(MembersInheritanceTestClass008.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass008.testMethod()); } [TestMethod] public void MembersInheritance018_Test() @@ -160,7 +160,7 @@ public void MembersInheritance018_Test() OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); OutputHelper.WriteLine(" members may not be accessible in the derived class."); - Assert.True(MembersInheritanceTestClass018.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass018.testMethod()); } [TestMethod] public void MembersInheritance019_Test() @@ -170,7 +170,7 @@ public void MembersInheritance019_Test() OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); OutputHelper.WriteLine(" members may not be accessible in the derived class."); - Assert.True(MembersInheritanceTestClass019.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass019.testMethod()); } [TestMethod] public void MembersInheritance020_Test() @@ -180,7 +180,7 @@ public void MembersInheritance020_Test() OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); OutputHelper.WriteLine(" members may not be accessible in the derived class."); - Assert.True(MembersInheritanceTestClass020.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass020.testMethod()); } [TestMethod] public void MembersInheritance021_Test() @@ -190,7 +190,7 @@ public void MembersInheritance021_Test() OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); OutputHelper.WriteLine(" members may not be accessible in the derived class."); - Assert.True(MembersInheritanceTestClass021.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass021.testMethod()); } [TestMethod] public void MembersInheritance022_Test() @@ -200,7 +200,7 @@ public void MembersInheritance022_Test() OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); OutputHelper.WriteLine(" members may not be accessible in the derived class."); - Assert.True(MembersInheritanceTestClass022.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass022.testMethod()); } [TestMethod] public void MembersInheritance023_Test() @@ -210,7 +210,7 @@ public void MembersInheritance023_Test() OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); OutputHelper.WriteLine(" members may not be accessible in the derived class."); - Assert.True(MembersInheritanceTestClass023.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass023.testMethod()); } [TestMethod] public void MembersInheritance024_Test() @@ -220,7 +220,7 @@ public void MembersInheritance024_Test() OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); OutputHelper.WriteLine(" members may not be accessible in the derived class."); - Assert.True(MembersInheritanceTestClass024.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass024.testMethod()); } [TestMethod] public void MembersInheritance025_Test() @@ -230,7 +230,7 @@ public void MembersInheritance025_Test() OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); OutputHelper.WriteLine(" members may not be accessible in the derived class."); - Assert.True(MembersInheritanceTestClass025.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass025.testMethod()); } [TestMethod] public void MembersInheritance026_Test() @@ -241,7 +241,7 @@ public void MembersInheritance026_Test() OutputHelper.WriteLine(" conversion exists from a derived class type to any of its base "); OutputHelper.WriteLine(" class types. Thus, a reference to a derived class instance"); OutputHelper.WriteLine(" can be treated as a reference to a base class instance."); - Assert.True(MembersInheritanceTestClass026.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass026.testMethod()); } [TestMethod] public void MembersInheritance027_Test() @@ -252,7 +252,7 @@ public void MembersInheritance027_Test() OutputHelper.WriteLine(" conversion exists from a derived class type to any of its base "); OutputHelper.WriteLine(" class types. Thus, a reference to a derived class instance"); OutputHelper.WriteLine(" can be treated as a reference to a base class instance."); - Assert.True(MembersInheritanceTestClass027.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass027.testMethod()); } [TestMethod] public void MembersInheritance028_Test() @@ -265,7 +265,7 @@ public void MembersInheritance028_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.True(MembersInheritanceTestClass028.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass028.testMethod()); } [TestMethod] public void MembersInheritance029_Test() @@ -278,7 +278,7 @@ public void MembersInheritance029_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.True(MembersInheritanceTestClass029.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass029.testMethod()); } [TestMethod] public void MembersInheritance030_Test() @@ -291,7 +291,7 @@ public void MembersInheritance030_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.True(MembersInheritanceTestClass030.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass030.testMethod()); } [TestMethod] public void MembersInheritance031_Test() @@ -304,7 +304,7 @@ public void MembersInheritance031_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.True(MembersInheritanceTestClass031.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass031.testMethod()); } [TestMethod] public void MembersInheritance032_Test() @@ -317,7 +317,7 @@ public void MembersInheritance032_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.False(MembersInheritanceTestClass032.testMethod()); + Assert.IsFalse(MembersInheritanceTestClass032.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21562"); OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -334,7 +334,7 @@ public void MembersInheritance033_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.True(MembersInheritanceTestClass033.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass033.testMethod()); } [TestMethod] public void MembersInheritance034_Test() @@ -347,7 +347,7 @@ public void MembersInheritance034_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.True(MembersInheritanceTestClass034.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass034.testMethod()); } [TestMethod] public void MembersInheritance035_Test() @@ -360,7 +360,7 @@ public void MembersInheritance035_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.True(MembersInheritanceTestClass035.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass035.testMethod()); } [TestMethod] public void MembersInheritance036_Test() @@ -373,7 +373,7 @@ public void MembersInheritance036_Test() OutputHelper.WriteLine(" actions performed by a function member invocation"); OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); OutputHelper.WriteLine(" through which the member is invoked."); - Assert.False(MembersInheritanceTestClass036.testMethod()); + Assert.IsFalse(MembersInheritanceTestClass036.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21562"); OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -386,7 +386,7 @@ public void MembersInheritance037_Test() OutputHelper.WriteLine(" a member with the same name or signature as an "); OutputHelper.WriteLine(" inherited member. When this occurs, the derived"); OutputHelper.WriteLine(" class member is said to hide the base class member."); - Assert.True(MembersInheritanceTestClass037.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass037.testMethod()); } [TestMethod] public void MembersInheritance038_Test() @@ -396,7 +396,7 @@ public void MembersInheritance038_Test() OutputHelper.WriteLine(" a member with the same name or signature as an "); OutputHelper.WriteLine(" inherited member. When this occurs, the derived"); OutputHelper.WriteLine(" class member is said to hide the base class member."); - Assert.True(MembersInheritanceTestClass038.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass038.testMethod()); } [TestMethod] public void MembersInheritance039_Test() @@ -406,7 +406,7 @@ public void MembersInheritance039_Test() OutputHelper.WriteLine(" a member with the same name or signature as an "); OutputHelper.WriteLine(" inherited member. When this occurs, the derived"); OutputHelper.WriteLine(" class member is said to hide the base class member."); - Assert.True(MembersInheritanceTestClass039.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass039.testMethod()); } [TestMethod] public void MembersInheritance040_Test() @@ -416,7 +416,7 @@ public void MembersInheritance040_Test() OutputHelper.WriteLine(" a member with the same name or signature as an "); OutputHelper.WriteLine(" inherited member. When this occurs, the derived"); OutputHelper.WriteLine(" class member is said to hide the base class member."); - Assert.True(MembersInheritanceTestClass040.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass040.testMethod()); } [TestMethod] public void MembersInheritance041_Test() @@ -425,7 +425,7 @@ public void MembersInheritance041_Test() OutputHelper.WriteLine(" If a new modifier is included in a declaration"); OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); OutputHelper.WriteLine(" is issued to that effect."); - Assert.True(MembersInheritanceTestClass041.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass041.testMethod()); } [TestMethod] public void MembersInheritance042_Test() @@ -434,7 +434,7 @@ public void MembersInheritance042_Test() OutputHelper.WriteLine(" If a new modifier is included in a declaration"); OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); OutputHelper.WriteLine(" is issued to that effect."); - Assert.True(MembersInheritanceTestClass042.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass042.testMethod()); } [TestMethod] public void MembersInheritance043_Test() @@ -443,7 +443,7 @@ public void MembersInheritance043_Test() OutputHelper.WriteLine(" If a new modifier is included in a declaration"); OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); OutputHelper.WriteLine(" is issued to that effect."); - Assert.True(MembersInheritanceTestClass043.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass043.testMethod()); } [TestMethod] public void MembersInheritance044_Test() @@ -452,7 +452,7 @@ public void MembersInheritance044_Test() OutputHelper.WriteLine(" If a new modifier is included in a declaration"); OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); OutputHelper.WriteLine(" is issued to that effect."); - Assert.True(MembersInheritanceTestClass044.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass044.testMethod()); } [TestMethod] public void MembersInheritance045_Test() @@ -461,7 +461,7 @@ public void MembersInheritance045_Test() OutputHelper.WriteLine(" If a new modifier is included in a declaration"); OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); OutputHelper.WriteLine(" is issued to that effect."); - Assert.True(MembersInheritanceTestClass045.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass045.testMethod()); } [TestMethod] public void MembersInheritance046_Test() @@ -470,7 +470,7 @@ public void MembersInheritance046_Test() OutputHelper.WriteLine(" If a new modifier is included in a declaration"); OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); OutputHelper.WriteLine(" is issued to that effect."); - Assert.True(MembersInheritanceTestClass046.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass046.testMethod()); } [TestMethod] public void MembersInheritance047_Test() @@ -479,7 +479,7 @@ public void MembersInheritance047_Test() OutputHelper.WriteLine(" If a new modifier is included in a declaration"); OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); OutputHelper.WriteLine(" is issued to that effect."); - Assert.True(MembersInheritanceTestClass047.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass047.testMethod()); } [TestMethod] public void MembersInheritance053_Test() @@ -488,32 +488,32 @@ public void MembersInheritance053_Test() OutputHelper.WriteLine(" If a new modifier is included in a declaration"); OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); OutputHelper.WriteLine(" is issued to that effect."); - Assert.True(MembersInheritanceTestClass053.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass053.testMethod()); } [TestMethod] public void MembersInheritance054_Test() { OutputHelper.WriteLine("Testing that protected members can be passed to a grandchild class"); - Assert.True(MembersInheritanceTestClass054.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass054.testMethod()); } [TestMethod] public void MembersInheritance057_Test() { OutputHelper.WriteLine("Testing that you can inherit from a member class"); - Assert.True(MembersInheritanceTestClass057.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass057.testMethod()); } [TestMethod] public void MembersInheritance058_Test() { OutputHelper.WriteLine("Testing that you can inherit from a class declared later in the file"); - Assert.True(MembersInheritanceTestClass058.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass058.testMethod()); } [TestMethod] public void MembersInheritance059_Test() { OutputHelper.WriteLine("Testing that an inner class inherit from another class"); - Assert.True(MembersInheritanceTestClass059.testMethod()); + Assert.IsTrue(MembersInheritanceTestClass059.testMethod()); } //Test Case Calls @@ -527,7 +527,7 @@ public void MembersModifiers01_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass01.testMethod()); + Assert.IsTrue(MembersModifiersTestClass01.testMethod()); } [TestMethod] public void MembersModifiers02_Test() @@ -539,7 +539,7 @@ public void MembersModifiers02_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass02.testMethod()); + Assert.IsTrue(MembersModifiersTestClass02.testMethod()); } [TestMethod] public void MembersModifiers03_Test() @@ -551,7 +551,7 @@ public void MembersModifiers03_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass03.testMethod()); + Assert.IsTrue(MembersModifiersTestClass03.testMethod()); } [TestMethod] public void MembersModifiers04_Test() @@ -563,7 +563,7 @@ public void MembersModifiers04_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass04.testMethod()); + Assert.IsTrue(MembersModifiersTestClass04.testMethod()); } [TestMethod] public void MembersModifiers05_Test() @@ -575,7 +575,7 @@ public void MembersModifiers05_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass05.testMethod()); + Assert.IsTrue(MembersModifiersTestClass05.testMethod()); } [TestMethod] public void MembersModifiers06_Test() @@ -587,7 +587,7 @@ public void MembersModifiers06_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass06.testMethod()); + Assert.IsTrue(MembersModifiersTestClass06.testMethod()); } [TestMethod] public void MembersModifiers07_Test() @@ -599,7 +599,7 @@ public void MembersModifiers07_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass07.testMethod()); + Assert.IsTrue(MembersModifiersTestClass07.testMethod()); } [TestMethod] public void MembersModifiers08_Test() @@ -611,7 +611,7 @@ public void MembersModifiers08_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass08.testMethod()); + Assert.IsTrue(MembersModifiersTestClass08.testMethod()); } [TestMethod] public void MembersModifiers12_Test() @@ -623,32 +623,32 @@ public void MembersModifiers12_Test() OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); OutputHelper.WriteLine(" does not include an access modifier, the declaration"); OutputHelper.WriteLine(" defaults to private."); - Assert.True(MembersModifiersTestClass12.testMethod()); + Assert.IsTrue(MembersModifiersTestClass12.testMethod()); } [TestMethod] public void MembersModifiers23_Test() { - Assert.True(MembersModifiersTestClass23.testMethod()); + Assert.IsTrue(MembersModifiersTestClass23.testMethod()); } [TestMethod] public void MembersModifiers24_Test() { - Assert.True(MembersModifiersTestClass24.testMethod()); + Assert.IsTrue(MembersModifiersTestClass24.testMethod()); } [TestMethod] public void MembersModifiers25_Test() { - Assert.True(MembersModifiersTestClass25.testMethod()); + Assert.IsTrue(MembersModifiersTestClass25.testMethod()); } [TestMethod] public void MembersModifiers26_Test() { - Assert.True(MembersModifiersTestClass26.testMethod()); + Assert.IsTrue(MembersModifiersTestClass26.testMethod()); } [TestMethod] public void MembersModifiers27_Test() { - Assert.True(MembersModifiersTestClass27.testMethod()); + Assert.IsTrue(MembersModifiersTestClass27.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestClasses/UnitTestMethodsTests.cs b/Tests/NFUnitTestClasses/UnitTestMethodsTests.cs index 84161e0b..c8da8afa 100644 --- a/Tests/NFUnitTestClasses/UnitTestMethodsTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestMethodsTests.cs @@ -15,7 +15,7 @@ public void Methods1_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass1.testMethod()); + Assert.IsTrue(MethodsTestClass1.testMethod()); } [TestMethod] @@ -26,7 +26,7 @@ public void Methods2_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass2.testMethod()); + Assert.IsTrue(MethodsTestClass2.testMethod()); } [TestMethod] @@ -37,7 +37,7 @@ public void Methods3_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass3.testMethod()); + Assert.IsTrue(MethodsTestClass3.testMethod()); } [TestMethod] @@ -48,7 +48,7 @@ public void Methods4_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass4.testMethod()); + Assert.IsTrue(MethodsTestClass4.testMethod()); } [TestMethod] @@ -59,7 +59,7 @@ public void Methods6_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass6.testMethod()); + Assert.IsTrue(MethodsTestClass6.testMethod()); } [TestMethod] @@ -70,7 +70,7 @@ public void Methods7_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass7.testMethod()); + Assert.IsTrue(MethodsTestClass7.testMethod()); } [TestMethod] @@ -81,7 +81,7 @@ public void Methods9_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass9.testMethod()); + Assert.IsTrue(MethodsTestClass9.testMethod()); } [TestMethod] @@ -92,7 +92,7 @@ public void Methods10_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass10.testMethod()); + Assert.IsTrue(MethodsTestClass10.testMethod()); } [TestMethod] @@ -103,7 +103,7 @@ public void Methods11_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.False(MethodsTestClass11.testMethod()); + Assert.IsFalse(MethodsTestClass11.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -118,7 +118,7 @@ public void Methods13_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass13.testMethod()); + Assert.IsTrue(MethodsTestClass13.testMethod()); } [TestMethod] @@ -129,7 +129,7 @@ public void Methods17_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass17.testMethod()); + Assert.IsTrue(MethodsTestClass17.testMethod()); } [TestMethod] @@ -139,7 +139,7 @@ public void Methods19_Test() OutputHelper.WriteLine(" the type of the value computed and returned by the"); OutputHelper.WriteLine(" method. The return type is void if the method does"); OutputHelper.WriteLine(" not return a value."); - Assert.True(MethodsTestClass19.testMethod()); + Assert.IsTrue(MethodsTestClass19.testMethod()); } [TestMethod] @@ -149,7 +149,7 @@ public void Methods20_Test() OutputHelper.WriteLine(" the type of the value computed and returned by the"); OutputHelper.WriteLine(" method. The return type is void if the method does"); OutputHelper.WriteLine(" not return a value."); - Assert.True(MethodsTestClass20.testMethod()); + Assert.IsTrue(MethodsTestClass20.testMethod()); } [TestMethod] @@ -159,7 +159,7 @@ public void Methods22_Test() OutputHelper.WriteLine(" the type of the value computed and returned by the"); OutputHelper.WriteLine(" method. The return type is void if the method does"); OutputHelper.WriteLine(" not return a value."); - Assert.True(MethodsTestClass22.testMethod()); + Assert.IsTrue(MethodsTestClass22.testMethod()); } [TestMethod] @@ -169,7 +169,7 @@ public void Methods23_Test() OutputHelper.WriteLine(" the type of the value computed and returned by the"); OutputHelper.WriteLine(" method. The return type is void if the method does"); OutputHelper.WriteLine(" not return a value."); - Assert.True(MethodsTestClass23.testMethod()); + Assert.IsTrue(MethodsTestClass23.testMethod()); } [TestMethod] @@ -179,7 +179,7 @@ public void Methods24_Test() OutputHelper.WriteLine(" the type of the value computed and returned by the"); OutputHelper.WriteLine(" method. The return type is void if the method does"); OutputHelper.WriteLine(" not return a value."); - Assert.True(MethodsTestClass24.testMethod()); + Assert.IsTrue(MethodsTestClass24.testMethod()); } [TestMethod] @@ -189,7 +189,7 @@ public void Methods25_Test() OutputHelper.WriteLine(" the type of the value computed and returned by the"); OutputHelper.WriteLine(" method. The return type is void if the method does"); OutputHelper.WriteLine(" not return a value."); - Assert.True(MethodsTestClass25.testMethod()); + Assert.IsTrue(MethodsTestClass25.testMethod()); } [TestMethod] @@ -199,7 +199,7 @@ public void Methods26_Test() OutputHelper.WriteLine(" the type of the value computed and returned by the"); OutputHelper.WriteLine(" method. The return type is void if the method does"); OutputHelper.WriteLine(" not return a value."); - Assert.True(MethodsTestClass26.testMethod()); + Assert.IsTrue(MethodsTestClass26.testMethod()); } [TestMethod] @@ -212,7 +212,7 @@ public void Methods29_Test() OutputHelper.WriteLine(" identifier. For an explicit interface member "); OutputHelper.WriteLine(" implementation, the member-name consists of an"); OutputHelper.WriteLine(" interface-type followed by a . and an identifier."); - Assert.True(MethodsTestClass29.testMethod()); + Assert.IsTrue(MethodsTestClass29.testMethod()); } [TestMethod] @@ -225,7 +225,7 @@ public void Methods30_Test() OutputHelper.WriteLine(" identifier. For an explicit interface member "); OutputHelper.WriteLine(" implementation, the member-name consists of an"); OutputHelper.WriteLine(" interface-type followed by a . and an identifier."); - Assert.True(MethodsTestClass30.testMethod()); + Assert.IsTrue(MethodsTestClass30.testMethod()); } [TestMethod] @@ -234,7 +234,7 @@ public void Methods33_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" The optional formal-parameter-list specifies"); OutputHelper.WriteLine(" the parameters of the method."); - Assert.True(MethodsTestClass33.testMethod()); + Assert.IsTrue(MethodsTestClass33.testMethod()); } [TestMethod] @@ -243,14 +243,14 @@ public void Methods34_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" The optional formal-parameter-list specifies"); OutputHelper.WriteLine(" the parameters of the method."); - Assert.True(MethodsTestClass34.testMethod()); + Assert.IsTrue(MethodsTestClass34.testMethod()); } [TestMethod] public void Methods35_Test() { OutputHelper.WriteLine("Testing method call with 10 parameters"); - Assert.True(MethodsTestClass35.testMethod()); + Assert.IsTrue(MethodsTestClass35.testMethod()); } [TestMethod] @@ -265,7 +265,7 @@ public void Methods56_Test() OutputHelper.WriteLine(" space of a method must be unique. Thus it is an error"); OutputHelper.WriteLine(" for a parameter or local variable to have the same name"); OutputHelper.WriteLine(" as another parameter or local variable."); - Assert.True(MethodsTestClass56.testMethod()); + Assert.IsTrue(MethodsTestClass56.testMethod()); } [TestMethod] @@ -280,7 +280,7 @@ public void Methods57_Test() OutputHelper.WriteLine(" space of a method must be unique. Thus it is an error"); OutputHelper.WriteLine(" for a parameter or local variable to have the same name"); OutputHelper.WriteLine(" as another parameter or local variable."); - Assert.True(MethodsTestClass57.testMethod()); + Assert.IsTrue(MethodsTestClass57.testMethod()); } [TestMethod] @@ -291,7 +291,7 @@ public void Methods58_Test() OutputHelper.WriteLine(" the corresponding argument in the method invocation"); OutputHelper.WriteLine(" must be an expression of a type that is implicitly"); OutputHelper.WriteLine(" convertible to the formal parameter type."); - Assert.True(MethodsTestClass58.testMethod()); + Assert.IsTrue(MethodsTestClass58.testMethod()); } [TestMethod] @@ -302,7 +302,7 @@ public void Methods59_Test() OutputHelper.WriteLine(" the corresponding argument in the method invocation"); OutputHelper.WriteLine(" must be an expression of a type that is implicitly"); OutputHelper.WriteLine(" convertible to the formal parameter type."); - Assert.True(MethodsTestClass59.testMethod()); + Assert.IsTrue(MethodsTestClass59.testMethod()); } [TestMethod] @@ -313,7 +313,7 @@ public void Methods60_Test() OutputHelper.WriteLine(" the corresponding argument in the method invocation"); OutputHelper.WriteLine(" must be an expression of a type that is implicitly"); OutputHelper.WriteLine(" convertible to the formal parameter type."); - Assert.True(MethodsTestClass60.testMethod()); + Assert.IsTrue(MethodsTestClass60.testMethod()); } [TestMethod] @@ -324,7 +324,7 @@ public void Methods61_Test() OutputHelper.WriteLine(" the corresponding argument in the method invocation"); OutputHelper.WriteLine(" must be an expression of a type that is implicitly"); OutputHelper.WriteLine(" convertible to the formal parameter type."); - Assert.True(MethodsTestClass61.testMethod()); + Assert.IsTrue(MethodsTestClass61.testMethod()); } [TestMethod] @@ -336,7 +336,7 @@ public void Methods66_Test() OutputHelper.WriteLine(" the local storage location represented by the "); OutputHelper.WriteLine(" value parameter--they have no effect on the actual "); OutputHelper.WriteLine(" argument given in the method invocation."); - Assert.True(MethodsTestClass66.testMethod()); + Assert.IsTrue(MethodsTestClass66.testMethod()); } [TestMethod] @@ -348,7 +348,7 @@ public void Methods67_Test() OutputHelper.WriteLine(" the local storage location represented by the "); OutputHelper.WriteLine(" value parameter--they have no effect on the actual "); OutputHelper.WriteLine(" argument given in the method invocation."); - Assert.True(MethodsTestClass67.testMethod()); + Assert.IsTrue(MethodsTestClass67.testMethod()); } [TestMethod] @@ -360,7 +360,7 @@ public void Methods68_Test() OutputHelper.WriteLine(" the local storage location represented by the "); OutputHelper.WriteLine(" value parameter--they have no effect on the actual "); OutputHelper.WriteLine(" argument given in the method invocation."); - Assert.True(MethodsTestClass68.testMethod()); + Assert.IsTrue(MethodsTestClass68.testMethod()); } [TestMethod] @@ -374,7 +374,7 @@ public void Methods69_Test() OutputHelper.WriteLine(" represents the same storage location as the"); OutputHelper.WriteLine(" variable given as the argument in the method"); OutputHelper.WriteLine(" invocation."); - Assert.True(MethodsTestClass69.testMethod()); + Assert.IsTrue(MethodsTestClass69.testMethod()); } [TestMethod] @@ -388,7 +388,7 @@ public void Methods70_Test() OutputHelper.WriteLine(" represents the same storage location as the"); OutputHelper.WriteLine(" variable given as the argument in the method"); OutputHelper.WriteLine(" invocation."); - Assert.True(MethodsTestClass70.testMethod()); + Assert.IsTrue(MethodsTestClass70.testMethod()); } [TestMethod] @@ -402,7 +402,7 @@ public void Methods71_Test() OutputHelper.WriteLine(" represents the same storage location as the"); OutputHelper.WriteLine(" variable given as the argument in the method"); OutputHelper.WriteLine(" invocation."); - Assert.True(MethodsTestClass71.testMethod()); + Assert.IsTrue(MethodsTestClass71.testMethod()); } [TestMethod] @@ -415,7 +415,7 @@ public void Methods75_Test() OutputHelper.WriteLine(" variable-reference of the same type as the formal"); OutputHelper.WriteLine(" parameter. A variable must be definitely assigned"); OutputHelper.WriteLine(" before it can be passed as a reference parameter."); - Assert.True(MethodsTestClass75.testMethod()); + Assert.IsTrue(MethodsTestClass75.testMethod()); } [TestMethod] @@ -427,7 +427,7 @@ public void Methods78_Test() OutputHelper.WriteLine(" parameter does not create a new storage location. Instead,"); OutputHelper.WriteLine(" an output parameter represents the same storage location"); OutputHelper.WriteLine(" as the variable given as the argument in the method invocation."); - Assert.True(MethodsTestClass78.testMethod()); + Assert.IsTrue(MethodsTestClass78.testMethod()); } [TestMethod] @@ -439,7 +439,7 @@ public void Methods79_Test() OutputHelper.WriteLine(" parameter does not create a new storage location. Instead,"); OutputHelper.WriteLine(" an output parameter represents the same storage location"); OutputHelper.WriteLine(" as the variable given as the argument in the method invocation."); - Assert.True(MethodsTestClass79.testMethod()); + Assert.IsTrue(MethodsTestClass79.testMethod()); } [TestMethod] @@ -451,7 +451,7 @@ public void Methods80_Test() OutputHelper.WriteLine(" parameter does not create a new storage location. Instead,"); OutputHelper.WriteLine(" an output parameter represents the same storage location"); OutputHelper.WriteLine(" as the variable given as the argument in the method invocation."); - Assert.True(MethodsTestClass80.testMethod()); + Assert.IsTrue(MethodsTestClass80.testMethod()); } [TestMethod] @@ -467,7 +467,7 @@ public void Methods84_Test() OutputHelper.WriteLine(" parameter, but following an invocation where a "); OutputHelper.WriteLine(" variable was passed as an output parameter, the"); OutputHelper.WriteLine(" variable is considered definitely assigned."); - Assert.True(MethodsTestClass84.testMethod()); + Assert.IsTrue(MethodsTestClass84.testMethod()); } [TestMethod] @@ -483,7 +483,7 @@ public void Methods85_Test() OutputHelper.WriteLine(" parameter, but following an invocation where a "); OutputHelper.WriteLine(" variable was passed as an output parameter, the"); OutputHelper.WriteLine(" variable is considered definitely assigned."); - Assert.True(MethodsTestClass85.testMethod()); + Assert.IsTrue(MethodsTestClass85.testMethod()); } [TestMethod] @@ -492,7 +492,7 @@ public void Methods92_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" Every output parameter of a method must be"); OutputHelper.WriteLine(" definitely assigned before the method returns."); - Assert.True(MethodsTestClass92.testMethod()); + Assert.IsTrue(MethodsTestClass92.testMethod()); } [TestMethod] @@ -501,7 +501,7 @@ public void Methods93_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" Every output parameter of a method must be"); OutputHelper.WriteLine(" definitely assigned before the method returns."); - Assert.True(MethodsTestClass93.testMethod()); + Assert.IsTrue(MethodsTestClass93.testMethod()); } [TestMethod] @@ -510,7 +510,7 @@ public void Methods94_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" Every output parameter of a method must be"); OutputHelper.WriteLine(" definitely assigned before the method returns."); - Assert.True(MethodsTestClass94.testMethod()); + Assert.IsTrue(MethodsTestClass94.testMethod()); } [TestMethod] @@ -519,7 +519,7 @@ public void Methods95_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" Every output parameter of a method must be"); OutputHelper.WriteLine(" definitely assigned before the method returns."); - Assert.True(MethodsTestClass95.testMethod()); + Assert.IsTrue(MethodsTestClass95.testMethod()); } [TestMethod] @@ -531,7 +531,7 @@ public void Methods103_Test() OutputHelper.WriteLine(" whether the method is invoked on an instance"); OutputHelper.WriteLine(" of the class in which it is declared or an "); OutputHelper.WriteLine(" instance of the derived class."); - Assert.True(MethodsTestClass103.testMethod()); + Assert.IsTrue(MethodsTestClass103.testMethod()); } @@ -544,7 +544,7 @@ public void Methods104_Test() OutputHelper.WriteLine(" whether the method is invoked on an instance"); OutputHelper.WriteLine(" of the class in which it is declared or an "); OutputHelper.WriteLine(" instance of the derived class."); - Assert.False(MethodsTestClass104.testMethod()); + Assert.IsFalse(MethodsTestClass104.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); @@ -562,7 +562,7 @@ public void Methods105_Test() OutputHelper.WriteLine(" whether the method is invoked on an instance"); OutputHelper.WriteLine(" of the class in which it is declared or an "); OutputHelper.WriteLine(" instance of the derived class."); - Assert.True(MethodsTestClass105.testMethod()); + Assert.IsTrue(MethodsTestClass105.testMethod()); } [TestMethod] @@ -579,7 +579,7 @@ public void Methods106_Test() OutputHelper.WriteLine(" If R contains the introducing virtual"); OutputHelper.WriteLine(" declaration of M, then this is the most"); OutputHelper.WriteLine(" derived implementation of M."); - Assert.True(MethodsTestClass106.testMethod()); + Assert.IsTrue(MethodsTestClass106.testMethod()); } [TestMethod] @@ -596,7 +596,7 @@ public void Methods107_Test() OutputHelper.WriteLine(" If R contains the introducing virtual"); OutputHelper.WriteLine(" declaration of M, then this is the most"); OutputHelper.WriteLine(" derived implementation of M."); - Assert.False(MethodsTestClass107.testMethod()); + Assert.IsFalse(MethodsTestClass107.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -620,7 +620,7 @@ public void Methods108_Test() OutputHelper.WriteLine(" Otherwise, if R contains an override of M,"); OutputHelper.WriteLine(" then this is the most derived implementation"); OutputHelper.WriteLine(" of M."); - Assert.True(MethodsTestClass108.testMethod()); + Assert.IsTrue(MethodsTestClass108.testMethod()); } [TestMethod] @@ -641,7 +641,7 @@ public void Methods109_Test() OutputHelper.WriteLine(" Otherwise, if R contains an override of M,"); OutputHelper.WriteLine(" then this is the most derived implementation"); OutputHelper.WriteLine(" of M."); - Assert.True(MethodsTestClass109.testMethod()); + Assert.IsTrue(MethodsTestClass109.testMethod()); } [TestMethod] @@ -662,7 +662,7 @@ public void Methods110_Test() OutputHelper.WriteLine(" Otherwise, if R contains an override of M,"); OutputHelper.WriteLine(" then this is the most derived implementation"); OutputHelper.WriteLine(" of M."); - Assert.False(MethodsTestClass110.testMethod()); + Assert.IsFalse(MethodsTestClass110.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -686,7 +686,7 @@ public void Methods111_Test() OutputHelper.WriteLine(" Otherwise, if R contains an override of M,"); OutputHelper.WriteLine(" then this is the most derived implementation"); OutputHelper.WriteLine(" of M."); - Assert.True(MethodsTestClass111.testMethod()); + Assert.IsTrue(MethodsTestClass111.testMethod()); } [TestMethod] @@ -698,7 +698,7 @@ public void Methods112_Test() OutputHelper.WriteLine(" several virtual methods with the same signature."); OutputHelper.WriteLine(" This does not provide an ambiguity problem, since"); OutputHelper.WriteLine(" all but the most derived method are hidden."); - Assert.False(MethodsTestClass112.testMethod()); + Assert.IsFalse(MethodsTestClass112.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -711,7 +711,7 @@ public void Methods116_Test() OutputHelper.WriteLine(" It is an error for an override method declaration"); OutputHelper.WriteLine(" to include any one of the new, static, virtual, or "); OutputHelper.WriteLine(" abstract modifiers."); - Assert.True(MethodsTestClass116.testMethod()); + Assert.IsTrue(MethodsTestClass116.testMethod()); } [TestMethod] @@ -724,7 +724,7 @@ public void Methods117_Test() OutputHelper.WriteLine(" internal and declared in the same project as "); OutputHelper.WriteLine(" C, or if it is private and declared in a class"); OutputHelper.WriteLine(" containing the declaration of C."); - Assert.True(MethodsTestClass117.testMethod()); + Assert.IsTrue(MethodsTestClass117.testMethod()); } [TestMethod] @@ -737,7 +737,7 @@ public void Methods119_Test() OutputHelper.WriteLine(" internal and declared in the same project as "); OutputHelper.WriteLine(" C, or if it is private and declared in a class"); OutputHelper.WriteLine(" containing the declaration of C."); - Assert.True(MethodsTestClass119.testMethod()); + Assert.IsTrue(MethodsTestClass119.testMethod()); } [TestMethod] @@ -750,7 +750,7 @@ public void Methods120_Test() OutputHelper.WriteLine(" internal and declared in the same project as "); OutputHelper.WriteLine(" C, or if it is private and declared in a class"); OutputHelper.WriteLine(" containing the declaration of C."); - Assert.True(MethodsTestClass120.testMethod()); + Assert.IsTrue(MethodsTestClass120.testMethod()); } [TestMethod] @@ -763,7 +763,7 @@ public void Methods121_Test() OutputHelper.WriteLine(" internal and declared in the same project as "); OutputHelper.WriteLine(" C, or if it is private and declared in a class"); OutputHelper.WriteLine(" containing the declaration of C."); - Assert.True(MethodsTestClass121.testMethod()); + Assert.IsTrue(MethodsTestClass121.testMethod()); } [TestMethod] @@ -781,7 +781,7 @@ public void Methods124_Test() OutputHelper.WriteLine(" abstract, or override method. In other"); OutputHelper.WriteLine(" words, the overridden base method cannot"); OutputHelper.WriteLine(" be static or non-virtual."); - Assert.True(MethodsTestClass124.testMethod()); + Assert.IsTrue(MethodsTestClass124.testMethod()); } [TestMethod] @@ -799,7 +799,7 @@ public void Methods125_Test() OutputHelper.WriteLine(" abstract, or override method. In other"); OutputHelper.WriteLine(" words, the overridden base method cannot"); OutputHelper.WriteLine(" be static or non-virtual."); - Assert.True(MethodsTestClass125.testMethod()); + Assert.IsTrue(MethodsTestClass125.testMethod()); } [TestMethod] @@ -808,7 +808,7 @@ public void Methods132_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" An override declaration can access the overridden "); OutputHelper.WriteLine(" base method using a base-access."); - Assert.True(MethodsTestClass132.testMethod()); + Assert.IsTrue(MethodsTestClass132.testMethod()); } [TestMethod] @@ -817,7 +817,7 @@ public void Methods133_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" An override declaration can access the overridden "); OutputHelper.WriteLine(" base method using a base-access."); - Assert.True(MethodsTestClass133.testMethod()); + Assert.IsTrue(MethodsTestClass133.testMethod()); } [TestMethod] @@ -829,7 +829,7 @@ public void Methods134_Test() OutputHelper.WriteLine(" cases, a method with the same signature as an"); OutputHelper.WriteLine(" inherited method simply hides the inherited "); OutputHelper.WriteLine(" member."); - Assert.False(MethodsTestClass134.testMethod()); + Assert.IsFalse(MethodsTestClass134.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -838,7 +838,7 @@ public void Methods134_Test() [TestMethod] public void Methods142_Test() { - Assert.True(MethodsTestClass142.testMethod()); + Assert.IsTrue(MethodsTestClass142.testMethod()); } [TestMethod] @@ -849,7 +849,7 @@ public void Methods148_Test() OutputHelper.WriteLine(" method completes normally (that is, if control"); OutputHelper.WriteLine(" flows off the end of the method body), the "); OutputHelper.WriteLine(" method simply returns to the caller."); - Assert.True(MethodsTestClass148.testMethod()); + Assert.IsTrue(MethodsTestClass148.testMethod()); } [TestMethod] @@ -860,7 +860,7 @@ public void Methods149_Test() OutputHelper.WriteLine(" each return statement in the method body must"); OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); OutputHelper.WriteLine(" covertable to the return type."); - Assert.True(MethodsTestClass149.testMethod()); + Assert.IsTrue(MethodsTestClass149.testMethod()); } [TestMethod] @@ -871,7 +871,7 @@ public void Methods150_Test() OutputHelper.WriteLine(" each return statement in the method body must"); OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); OutputHelper.WriteLine(" covertable to the return type."); - Assert.True(MethodsTestClass150.testMethod()); + Assert.IsTrue(MethodsTestClass150.testMethod()); } [TestMethod] @@ -882,7 +882,7 @@ public void Methods154_Test() OutputHelper.WriteLine(" each return statement in the method body must"); OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); OutputHelper.WriteLine(" covertable to the return type."); - Assert.True(MethodsTestClass154.testMethod()); + Assert.IsTrue(MethodsTestClass154.testMethod()); } [TestMethod] @@ -897,7 +897,7 @@ public void Methods159_Test() OutputHelper.WriteLine(" to terminate in a return statement that specifies"); OutputHelper.WriteLine(" an expression or in a throw statement that throws"); OutputHelper.WriteLine(" an System.Exception."); - Assert.True(MethodsTestClass159.testMethod()); + Assert.IsTrue(MethodsTestClass159.testMethod()); } [TestMethod] @@ -912,7 +912,7 @@ public void Methods160_Test() OutputHelper.WriteLine(" to terminate in a return statement that specifies"); OutputHelper.WriteLine(" an expression or in a throw statement that throws"); OutputHelper.WriteLine(" an System.Exception."); - Assert.True(MethodsTestClass160.testMethod()); + Assert.IsTrue(MethodsTestClass160.testMethod()); } [TestMethod] @@ -927,7 +927,7 @@ public void Methods161_Test() OutputHelper.WriteLine(" to terminate in a return statement that specifies"); OutputHelper.WriteLine(" an expression or in a throw statement that throws"); OutputHelper.WriteLine(" an System.Exception."); - Assert.True(MethodsTestClass161.testMethod()); + Assert.IsTrue(MethodsTestClass161.testMethod()); } [TestMethod] @@ -942,7 +942,7 @@ public void Methods163_Test() OutputHelper.WriteLine(" types int[] and int[][] can be used as the type of"); OutputHelper.WriteLine(" a params parameter, but the type int[,] cannot be"); OutputHelper.WriteLine(" used in this way."); - Assert.True(MethodsTestClass163.testMethod()); + Assert.IsTrue(MethodsTestClass163.testMethod()); } [TestMethod] @@ -957,7 +957,7 @@ public void Methods164_Test() OutputHelper.WriteLine(" types int[] and int[][] can be used as the type of"); OutputHelper.WriteLine(" a params parameter, but the type int[,] cannot be"); OutputHelper.WriteLine(" used in this way."); - Assert.True(MethodsTestClass164.testMethod()); + Assert.IsTrue(MethodsTestClass164.testMethod()); } [TestMethod] @@ -970,7 +970,7 @@ public void Methods169_Test() OutputHelper.WriteLine(" is implicitly convertible to the formal parameter type."); OutputHelper.WriteLine(" In this case, the params parameter acts precisely like"); OutputHelper.WriteLine(" a value parameter."); - Assert.True(MethodsTestClass169.testMethod()); + Assert.IsTrue(MethodsTestClass169.testMethod()); } [TestMethod] @@ -985,7 +985,7 @@ public void Methods172_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass172.testMethod()); + Assert.IsTrue(MethodsTestClass172.testMethod()); } [TestMethod] @@ -1000,7 +1000,7 @@ public void Methods173_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass173.testMethod()); + Assert.IsTrue(MethodsTestClass173.testMethod()); } [TestMethod] @@ -1015,7 +1015,7 @@ public void Methods174_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass174.testMethod()); + Assert.IsTrue(MethodsTestClass174.testMethod()); } [TestMethod] @@ -1030,7 +1030,7 @@ public void Methods175_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass175.testMethod()); + Assert.IsTrue(MethodsTestClass175.testMethod()); } [TestMethod] @@ -1045,7 +1045,7 @@ public void Methods179_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass179.testMethod()); + Assert.IsTrue(MethodsTestClass179.testMethod()); } [TestMethod] @@ -1060,7 +1060,7 @@ public void Methods180_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass180.testMethod()); + Assert.IsTrue(MethodsTestClass180.testMethod()); } [TestMethod] @@ -1075,7 +1075,7 @@ public void Methods181_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass181.testMethod()); + Assert.IsTrue(MethodsTestClass181.testMethod()); } [TestMethod] @@ -1090,7 +1090,7 @@ public void Methods182_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass182.testMethod()); + Assert.IsTrue(MethodsTestClass182.testMethod()); } [TestMethod] @@ -1105,7 +1105,7 @@ public void Methods183_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass183.testMethod()); + Assert.IsTrue(MethodsTestClass183.testMethod()); } [TestMethod] @@ -1120,7 +1120,7 @@ public void Methods184_Test() OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); OutputHelper.WriteLine(" the caller."); - Assert.True(MethodsTestClass184.testMethod()); + Assert.IsTrue(MethodsTestClass184.testMethod()); } [TestMethod] @@ -1131,7 +1131,7 @@ public void Methods185_Test() OutputHelper.WriteLine(" to a params parameter. Such assignments only"); OutputHelper.WriteLine(" affect the local storage location represented"); OutputHelper.WriteLine(" by the params parameter."); - Assert.True(MethodsTestClass185.testMethod()); + Assert.IsTrue(MethodsTestClass185.testMethod()); } [TestMethod] @@ -1140,7 +1140,7 @@ public void Methods186_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" A params parameter can be passed along to another"); OutputHelper.WriteLine(" params parameter."); - Assert.True(MethodsTestClass186.testMethod()); + Assert.IsTrue(MethodsTestClass186.testMethod()); } [TestMethod] @@ -1149,56 +1149,56 @@ public void Methods187_Test() OutputHelper.WriteLine(" Section 10.5"); OutputHelper.WriteLine(" A params parameter can be passed along to another"); OutputHelper.WriteLine(" params parameter."); - Assert.True(MethodsTestClass187.testMethod()); + Assert.IsTrue(MethodsTestClass187.testMethod()); } [TestMethod] public void Methods188_Test() { OutputHelper.WriteLine("Testing explicit base method call to a child class whose parent implements"); - Assert.True(MethodsTestClass188.testMethod()); + Assert.IsTrue(MethodsTestClass188.testMethod()); } [TestMethod] public void Methods190_Test() { OutputHelper.WriteLine("Testing implicit base method calls to protected methods in parent class"); - Assert.True(MethodsTestClass190.testMethod()); + Assert.IsTrue(MethodsTestClass190.testMethod()); } [TestMethod] public void Methods191_Test() { OutputHelper.WriteLine("Testing implicit base method calls to internal methods in parent class"); - Assert.True(MethodsTestClass191.testMethod()); + Assert.IsTrue(MethodsTestClass191.testMethod()); } [TestMethod] public void Methods192_Test() { OutputHelper.WriteLine("Testing implicit base method calls to protected internal methods in parent class"); - Assert.True(MethodsTestClass192.testMethod()); + Assert.IsTrue(MethodsTestClass192.testMethod()); } [TestMethod] public void Methods193_Test() { OutputHelper.WriteLine("Testing implicit base method calls to private methods in parent class"); - Assert.True(MethodsTestClass193.testMethod()); + Assert.IsTrue(MethodsTestClass193.testMethod()); } [TestMethod] public void Methods194_Test() { OutputHelper.WriteLine("Testing implicit base method calls to public virtual methods in parent class"); - Assert.True(MethodsTestClass194.testMethod()); + Assert.IsTrue(MethodsTestClass194.testMethod()); } [TestMethod] public void Methods195_Test() { OutputHelper.WriteLine("Tests if a new method does not overwrite a virtual method in a base class"); - Assert.False(MethodsTestClass195.testMethod()); + Assert.IsFalse(MethodsTestClass195.testMethod()); OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); @@ -1208,63 +1208,63 @@ public void Methods195_Test() public void Methods196_Test() { OutputHelper.WriteLine("Tests if a new method does overwrite an abstract method in a base class"); - Assert.True(MethodsTestClass196.testMethod()); + Assert.IsTrue(MethodsTestClass196.testMethod()); } [TestMethod] public void Methods197_Test() { OutputHelper.WriteLine("Tests the calling of an empty delegate"); - Assert.True(MethodsTestClass197.testMethod()); + Assert.IsTrue(MethodsTestClass197.testMethod()); } [TestMethod] public void Methods199_Test() { OutputHelper.WriteLine("Tests if a sealed method overwrites a virtual method in a base class"); - Assert.True(MethodsTestClass199.testMethod()); + Assert.IsTrue(MethodsTestClass199.testMethod()); } [TestMethod] public void Methods200_Test() { OutputHelper.WriteLine("Tests large number of assignments inside a public method"); - Assert.True(MethodsTestClass200.testMethod()); + Assert.IsTrue(MethodsTestClass200.testMethod()); } [TestMethod] public void Methods201_Test() { OutputHelper.WriteLine("Tests large number of assignments inside a public static method"); - Assert.True(MethodsTestClass201.testMethod()); + Assert.IsTrue(MethodsTestClass201.testMethod()); } [TestMethod] public void Methods204_Test() { OutputHelper.WriteLine("Tests a method with explicit, params signature"); - Assert.True(MethodsTestClass204.testMethod()); + Assert.IsTrue(MethodsTestClass204.testMethod()); } [TestMethod] public void Methods205_Test() { OutputHelper.WriteLine("Tests a method with a mixed explicit and params signature"); - Assert.True(MethodsTestClass205.testMethod()); + Assert.IsTrue(MethodsTestClass205.testMethod()); } [TestMethod] public void Methods206_Test() { OutputHelper.WriteLine("Tests method overloading between params and explicit signatures (static)"); - Assert.True(MethodsTestClass206.testMethod()); + Assert.IsTrue(MethodsTestClass206.testMethod()); } [TestMethod] public void Methods207_Test() { OutputHelper.WriteLine("Tests method overloading between params and explicit signatures"); - Assert.True(MethodsTestClass207.testMethod()); + Assert.IsTrue(MethodsTestClass207.testMethod()); } [TestMethod] @@ -1272,20 +1272,20 @@ public void Methods210_Test() { OutputHelper.WriteLine(" Section 10.5 If the declaration includes the sealed modifier, then the "); OutputHelper.WriteLine(" declaration must also include the override modifier."); - Assert.True(MethodsTestClass210.testMethod()); + Assert.IsTrue(MethodsTestClass210.testMethod()); } [TestMethod] public void Methods223_Test() { OutputHelper.WriteLine(" Section 10.5 The ref and out parameters are part of a method's signature, but the params modifier is not."); - Assert.True(MethodsTestClass223.testMethod()); + Assert.IsTrue(MethodsTestClass223.testMethod()); } [TestMethod] public void Methods224_Test() { OutputHelper.WriteLine(" Section 10.5 The ref and out parameters are part of a method's signature, but the params modifier is not."); - Assert.True(MethodsTestClass224.testMethod()); + Assert.IsTrue(MethodsTestClass224.testMethod()); } [TestMethod] public void Methods229_Test() @@ -1293,7 +1293,7 @@ public void Methods229_Test() OutputHelper.WriteLine(" error CS0114: 'function1' hides inherited member 'function2'."); OutputHelper.WriteLine(" To make the current method override that implementation, add "); OutputHelper.WriteLine(" the override keyword. Otherwise add the new keyword."); - Assert.True(MethodsTestClass229.testMethod()); + Assert.IsTrue(MethodsTestClass229.testMethod()); } [TestMethod] public void Methods230_Test() @@ -1301,7 +1301,7 @@ public void Methods230_Test() OutputHelper.WriteLine(" error CS0114: 'function1' hides inherited member 'function2'."); OutputHelper.WriteLine(" To make the current method override that implementation, add "); OutputHelper.WriteLine(" the override keyword. Otherwise add the new keyword."); - Assert.True(MethodsTestClass230.testMethod()); + Assert.IsTrue(MethodsTestClass230.testMethod()); } [TestMethod] public void Methods231_Test() @@ -1309,7 +1309,7 @@ public void Methods231_Test() OutputHelper.WriteLine(" error CS0114: 'function1' hides inherited member 'function2'."); OutputHelper.WriteLine(" To make the current method override that implementation, add "); OutputHelper.WriteLine(" the override keyword. Otherwise add the new keyword."); - Assert.True(MethodsTestClass231.testMethod()); + Assert.IsTrue(MethodsTestClass231.testMethod()); } [TestMethod] public void Methods232_Test() @@ -1317,7 +1317,7 @@ public void Methods232_Test() OutputHelper.WriteLine(" error CS0114: 'function1' hides inherited member 'function2'."); OutputHelper.WriteLine(" To make the current method override that implementation, add "); OutputHelper.WriteLine(" the override keyword. Otherwise add the new keyword."); - Assert.True(MethodsTestClass232.testMethod()); + Assert.IsTrue(MethodsTestClass232.testMethod()); } [TestMethod] public void Methods233_Test() @@ -1327,7 +1327,7 @@ public void Methods233_Test() OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); OutputHelper.WriteLine(" modifiers, and an extern modifier."); - Assert.True(MethodsTestClass233.testMethod()); + Assert.IsTrue(MethodsTestClass233.testMethod()); } public class MethodsTestClass_Base1 diff --git a/Tests/NFUnitTestClasses/UnitTestOperatorTests.cs b/Tests/NFUnitTestClasses/UnitTestOperatorTests.cs index 6c610e96..93e3e106 100644 --- a/Tests/NFUnitTestClasses/UnitTestOperatorTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestOperatorTests.cs @@ -17,188 +17,188 @@ class UnitTestOperatorTests public void Operators1_Test() { OutputHelper.WriteLine("Tests overriding unary plus"); - Assert.True(OperatorsTestClass1.testMethod()); + Assert.IsTrue(OperatorsTestClass1.testMethod()); } [TestMethod] public void Operators2_Test() { OutputHelper.WriteLine("Tests overriding unary minus"); - Assert.True(OperatorsTestClass2.testMethod()); + Assert.IsTrue(OperatorsTestClass2.testMethod()); } [TestMethod] public void Operators3_Test() { OutputHelper.WriteLine("Tests overriding tilde"); - Assert.True(OperatorsTestClass3.testMethod()); + Assert.IsTrue(OperatorsTestClass3.testMethod()); } [TestMethod] public void Operators4_Test() { OutputHelper.WriteLine("Tests overriding increment prefix"); - Assert.True(OperatorsTestClass4.testMethod()); + Assert.IsTrue(OperatorsTestClass4.testMethod()); } [TestMethod] public void Operators5_Test() { OutputHelper.WriteLine("Tests overriding increment suffix"); - Assert.True(OperatorsTestClass5.testMethod()); + Assert.IsTrue(OperatorsTestClass5.testMethod()); } [TestMethod] public void Operators6_Test() { OutputHelper.WriteLine("Tests overriding decrement prefix"); - Assert.True(OperatorsTestClass6.testMethod()); + Assert.IsTrue(OperatorsTestClass6.testMethod()); } [TestMethod] public void Operators7_Test() { OutputHelper.WriteLine("Tests overriding decrement suffix"); - Assert.True(OperatorsTestClass7.testMethod()); + Assert.IsTrue(OperatorsTestClass7.testMethod()); } [TestMethod] public void Operators13_Test() { OutputHelper.WriteLine("Tests overriding binary plus"); - Assert.True(OperatorsTestClass13.testMethod()); + Assert.IsTrue(OperatorsTestClass13.testMethod()); } [TestMethod] public void Operators14_Test() { OutputHelper.WriteLine("Tests overriding binary minus"); - Assert.True(OperatorsTestClass14.testMethod()); + Assert.IsTrue(OperatorsTestClass14.testMethod()); } [TestMethod] public void Operators15_Test() { OutputHelper.WriteLine("Tests overriding asterisk (multiply)"); - Assert.True(OperatorsTestClass15.testMethod()); + Assert.IsTrue(OperatorsTestClass15.testMethod()); } [TestMethod] public void Operators16_Test() { OutputHelper.WriteLine("Tests overriding slash (division)"); - Assert.True(OperatorsTestClass16.testMethod()); + Assert.IsTrue(OperatorsTestClass16.testMethod()); } [TestMethod] public void Operators17_Test() { OutputHelper.WriteLine("Tests overriding percent (modulus)"); - Assert.True(OperatorsTestClass17.testMethod()); + Assert.IsTrue(OperatorsTestClass17.testMethod()); } [TestMethod] public void Operators18_Test() { OutputHelper.WriteLine("Tests overriding caret (xor)"); - Assert.True(OperatorsTestClass18.testMethod()); + Assert.IsTrue(OperatorsTestClass18.testMethod()); } [TestMethod] public void Operators19_Test() { OutputHelper.WriteLine("Tests overriding ampersand"); - Assert.True(OperatorsTestClass19.testMethod()); + Assert.IsTrue(OperatorsTestClass19.testMethod()); } [TestMethod] public void Operators20_Test() { OutputHelper.WriteLine("Tests overriding pipe (or)"); - Assert.True(OperatorsTestClass20.testMethod()); + Assert.IsTrue(OperatorsTestClass20.testMethod()); } [TestMethod] public void Operators21_Test() { OutputHelper.WriteLine("Tests overriding double less-than (left shift)"); - Assert.True(OperatorsTestClass21.testMethod()); + Assert.IsTrue(OperatorsTestClass21.testMethod()); } [TestMethod] public void Operators22_Test() { OutputHelper.WriteLine("Tests overriding double greater-than (right shift)"); - Assert.True(OperatorsTestClass22.testMethod()); + Assert.IsTrue(OperatorsTestClass22.testMethod()); } [TestMethod] public void Operators23_Test() { OutputHelper.WriteLine("Tests overriding binary plus with 1 int parameter"); - Assert.True(OperatorsTestClass23.testMethod()); + Assert.IsTrue(OperatorsTestClass23.testMethod()); } [TestMethod] public void Operators24_Test() { OutputHelper.WriteLine("Tests overriding double equals (equality comparison) and exclamation-equals (non-equality comparison)"); - Assert.True(OperatorsTestClass24.testMethod()); + Assert.IsTrue(OperatorsTestClass24.testMethod()); } [TestMethod] public void Operators38_Test() { OutputHelper.WriteLine("Tests overriding binary plus with 1 int parameter"); - Assert.True(OperatorsTestClass38.testMethod()); + Assert.IsTrue(OperatorsTestClass38.testMethod()); } [TestMethod] public void Operators39_Test() { OutputHelper.WriteLine("Tests overriding binary minus with 1 int parameter"); - Assert.True(OperatorsTestClass39.testMethod()); + Assert.IsTrue(OperatorsTestClass39.testMethod()); } [TestMethod] public void Operators40_Test() { OutputHelper.WriteLine("Tests overriding asterisk (multiply) with 1 int parameter"); - Assert.True(OperatorsTestClass40.testMethod()); + Assert.IsTrue(OperatorsTestClass40.testMethod()); } [TestMethod] public void Operators41_Test() { OutputHelper.WriteLine("Tests overriding slash (divide) with 1 int parameter"); - Assert.True(OperatorsTestClass41.testMethod()); + Assert.IsTrue(OperatorsTestClass41.testMethod()); } [TestMethod] public void Operators42_Test() { OutputHelper.WriteLine("Tests overriding percent (modulus) with 1 int parameter"); - Assert.True(OperatorsTestClass42.testMethod()); + Assert.IsTrue(OperatorsTestClass42.testMethod()); } [TestMethod] public void Operators43_Test() { OutputHelper.WriteLine("Tests overriding caret (xor) with 1 int parameter"); - Assert.True(OperatorsTestClass43.testMethod()); + Assert.IsTrue(OperatorsTestClass43.testMethod()); } [TestMethod] public void Operators44_Test() { OutputHelper.WriteLine("Tests overriding ampersand with 1 int parameter"); - Assert.True(OperatorsTestClass44.testMethod()); + Assert.IsTrue(OperatorsTestClass44.testMethod()); } [TestMethod] public void Operators45_Test() { OutputHelper.WriteLine("Tests overriding pipe (or) with 1 int parameter"); - Assert.True(OperatorsTestClass45.testMethod()); + Assert.IsTrue(OperatorsTestClass45.testMethod()); } [TestMethod] @@ -206,91 +206,91 @@ public void Operators46_Test() { OutputHelper.WriteLine("Tests overriding double equals (equality comparison) and exclamation-equals "); OutputHelper.WriteLine("(non-equality comparison) with 1 int"); - Assert.True(OperatorsTestClass46.testMethod()); + Assert.IsTrue(OperatorsTestClass46.testMethod()); } [TestMethod] public void Operators67_Test() { OutputHelper.WriteLine("Tests overriding unary exclamation (not)"); - Assert.True(OperatorsTestClass67.testMethod()); + Assert.IsTrue(OperatorsTestClass67.testMethod()); } [TestMethod] public void Operators68_Test() { OutputHelper.WriteLine("Tests overriding true and false"); - Assert.True(OperatorsTestClass68.testMethod()); + Assert.IsTrue(OperatorsTestClass68.testMethod()); } [TestMethod] public void Operators69_Test() { OutputHelper.WriteLine("Tests overriding true and false and ampersand"); - Assert.True(OperatorsTestClass69.testMethod()); + Assert.IsTrue(OperatorsTestClass69.testMethod()); } [TestMethod] public void Operators88_Test() { OutputHelper.WriteLine("Tests true and false with ampersand"); - Assert.True(OperatorsTestClass88.testMethod()); + Assert.IsTrue(OperatorsTestClass88.testMethod()); } [TestMethod] public void Operators89_Test() { OutputHelper.WriteLine("Tests true and false with double ampersand"); - Assert.True(OperatorsTestClass89.testMethod()); + Assert.IsTrue(OperatorsTestClass89.testMethod()); } [TestMethod] public void Operators90_Test() { OutputHelper.WriteLine("Tests true and false with pipe (or)"); - Assert.True(OperatorsTestClass90.testMethod()); + Assert.IsTrue(OperatorsTestClass90.testMethod()); } [TestMethod] public void Operators91_Test() { OutputHelper.WriteLine("Tests true and false with double pipe (or)"); - Assert.True(OperatorsTestClass91.testMethod()); + Assert.IsTrue(OperatorsTestClass91.testMethod()); } [TestMethod] public void Operators92_Test() { OutputHelper.WriteLine("Tests true and false with caret (xor)"); - Assert.True(OperatorsTestClass92.testMethod()); + Assert.IsTrue(OperatorsTestClass92.testMethod()); } [TestMethod] public void Operators93_Test() { OutputHelper.WriteLine("Tests numerical types with plus"); - Assert.True(OperatorsTestClass93.testMethod()); + Assert.IsTrue(OperatorsTestClass93.testMethod()); } [TestMethod] public void Operators94_Test() { OutputHelper.WriteLine("Tests numerical types with minus"); - Assert.True(OperatorsTestClass94.testMethod()); + Assert.IsTrue(OperatorsTestClass94.testMethod()); } [TestMethod] public void Operators95_Test() { OutputHelper.WriteLine("Tests numerical types with asterisk (multiply)"); - Assert.True(OperatorsTestClass95.testMethod()); + Assert.IsTrue(OperatorsTestClass95.testMethod()); } [TestMethod] public void Operators96_Test() { OutputHelper.WriteLine("Tests numerical types with slash (divide)"); - Assert.True(OperatorsTestClass96.testMethod()); + Assert.IsTrue(OperatorsTestClass96.testMethod()); } class OperatorsTestClass1 diff --git a/Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs b/Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs index 490d259a..1fcdd2f4 100644 --- a/Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs @@ -20,7 +20,7 @@ public void Properties003_Test() OutputHelper.WriteLine("A property declaration may include set of"); OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); - Assert.True(PropertiesTestClass003.testMethod()); + Assert.IsTrue(PropertiesTestClass003.testMethod()); } [TestMethod] public void Properties004_Test() @@ -29,7 +29,7 @@ public void Properties004_Test() OutputHelper.WriteLine("A property declaration may include set of"); OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); - Assert.True(PropertiesTestClass004.testMethod()); + Assert.IsTrue(PropertiesTestClass004.testMethod()); } [TestMethod] public void Properties005_Test() @@ -38,7 +38,7 @@ public void Properties005_Test() OutputHelper.WriteLine("A property declaration may include set of"); OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); - Assert.True(PropertiesTestClass005.testMethod()); + Assert.IsTrue(PropertiesTestClass005.testMethod()); } [TestMethod] public void Properties006_Test() @@ -47,7 +47,7 @@ public void Properties006_Test() OutputHelper.WriteLine("A property declaration may include set of"); OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); - Assert.True(PropertiesTestClass006.testMethod()); + Assert.IsTrue(PropertiesTestClass006.testMethod()); } [TestMethod] public void Properties007_Test() @@ -56,7 +56,7 @@ public void Properties007_Test() OutputHelper.WriteLine("A property declaration may include set of"); OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); - Assert.True(PropertiesTestClass007.testMethod()); + Assert.IsTrue(PropertiesTestClass007.testMethod()); } [TestMethod] public void Properties008_Test() @@ -65,7 +65,7 @@ public void Properties008_Test() OutputHelper.WriteLine("A property declaration may include set of"); OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); - Assert.True(PropertiesTestClass008.testMethod()); + Assert.IsTrue(PropertiesTestClass008.testMethod()); } [TestMethod] public void Properties009_Test() @@ -74,7 +74,7 @@ public void Properties009_Test() OutputHelper.WriteLine("A property declaration may include set of"); OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); - Assert.True(PropertiesTestClass009.testMethod()); + Assert.IsTrue(PropertiesTestClass009.testMethod()); } [TestMethod] public void Properties010_Test() @@ -83,7 +83,7 @@ public void Properties010_Test() OutputHelper.WriteLine("A property declaration may include set of"); OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); - Assert.True(PropertiesTestClass010.testMethod()); + Assert.IsTrue(PropertiesTestClass010.testMethod()); } [TestMethod] public void Properties011_Test() @@ -99,7 +99,7 @@ public void Properties011_Test() OutputHelper.WriteLine("member name consists of an interface-type followed"); OutputHelper.WriteLine("by a . and an identifier."); OutputHelper.WriteLine("This is currently an expected fail, but is resolved in 3.0 see Bug 16341 for details"); - Assert.True(PropertiesTestClass011.testMethod()); + Assert.IsTrue(PropertiesTestClass011.testMethod()); } [TestMethod] public void Properties024_Test() @@ -109,7 +109,7 @@ public void Properties024_Test() OutputHelper.WriteLine("a given instance of a class, and this instance"); OutputHelper.WriteLine("can be accessed as this in the accessors of"); OutputHelper.WriteLine("the property."); - Assert.True(PropertiesTestClass024.testMethod()); + Assert.IsTrue(PropertiesTestClass024.testMethod()); } [TestMethod] public void Properties025_Test() @@ -119,7 +119,7 @@ public void Properties025_Test() OutputHelper.WriteLine("a given instance of a class, and this instance"); OutputHelper.WriteLine("can be accessed as this in the accessors of"); OutputHelper.WriteLine("the property."); - Assert.True(PropertiesTestClass025.testMethod()); + Assert.IsTrue(PropertiesTestClass025.testMethod()); } [TestMethod] public void Properties026_Test() @@ -129,7 +129,7 @@ public void Properties026_Test() OutputHelper.WriteLine("of the form E.M, if M is a static property, E must"); OutputHelper.WriteLine("denote a type, and if M is an instance property,"); OutputHelper.WriteLine("E must denote an instance."); - Assert.True(PropertiesTestClass026.testMethod()); + Assert.IsTrue(PropertiesTestClass026.testMethod()); } [TestMethod] public void Properties027_Test() @@ -139,7 +139,7 @@ public void Properties027_Test() OutputHelper.WriteLine("of the form E.M, if M is a static property, E must"); OutputHelper.WriteLine("denote a type, and if M is an instance property,"); OutputHelper.WriteLine("E must denote an instance."); - Assert.True(PropertiesTestClass027.testMethod()); + Assert.IsTrue(PropertiesTestClass027.testMethod()); } [TestMethod] public void Properties033_Test() @@ -148,7 +148,7 @@ public void Properties033_Test() OutputHelper.WriteLine("The accessor declarations consist of a "); OutputHelper.WriteLine("get-accessor-declaration, a set-accessor"); OutputHelper.WriteLine("declaration, or both."); - Assert.True(PropertiesTestClass033.testMethod()); + Assert.IsTrue(PropertiesTestClass033.testMethod()); } [TestMethod] public void Properties034_Test() @@ -157,7 +157,7 @@ public void Properties034_Test() OutputHelper.WriteLine("The accessor declarations consist of a "); OutputHelper.WriteLine("get-accessor-declaration, a set-accessor"); OutputHelper.WriteLine("declaration, or both."); - Assert.True(PropertiesTestClass034.testMethod()); + Assert.IsTrue(PropertiesTestClass034.testMethod()); } [TestMethod] public void Properties035_Test() @@ -166,7 +166,7 @@ public void Properties035_Test() OutputHelper.WriteLine("The accessor declarations consist of a "); OutputHelper.WriteLine("get-accessor-declaration, a set-accessor"); OutputHelper.WriteLine("declaration, or both."); - Assert.True(PropertiesTestClass035.testMethod()); + Assert.IsTrue(PropertiesTestClass035.testMethod()); } [TestMethod] public void Properties036_Test() @@ -175,7 +175,7 @@ public void Properties036_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass036.testMethod()); + Assert.IsTrue(PropertiesTestClass036.testMethod()); } [TestMethod] public void Properties037_Test() @@ -184,7 +184,7 @@ public void Properties037_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass037.testMethod()); + Assert.IsTrue(PropertiesTestClass037.testMethod()); } [TestMethod] public void Properties038_Test() @@ -193,7 +193,7 @@ public void Properties038_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass038.testMethod()); + Assert.IsTrue(PropertiesTestClass038.testMethod()); } [TestMethod] public void Properties043_Test() @@ -202,7 +202,7 @@ public void Properties043_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass043.testMethod()); + Assert.IsTrue(PropertiesTestClass043.testMethod()); } [TestMethod] public void Properties046_Test() @@ -211,7 +211,7 @@ public void Properties046_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass046.testMethod()); + Assert.IsTrue(PropertiesTestClass046.testMethod()); } [TestMethod] public void Properties048_Test() @@ -220,7 +220,7 @@ public void Properties048_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass048.testMethod()); + Assert.IsTrue(PropertiesTestClass048.testMethod()); } [TestMethod] public void Properties050_Test() @@ -229,7 +229,7 @@ public void Properties050_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass050.testMethod()); + Assert.IsTrue(PropertiesTestClass050.testMethod()); } [TestMethod] public void Properties053_Test() @@ -238,7 +238,7 @@ public void Properties053_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass053.testMethod()); + Assert.IsTrue(PropertiesTestClass053.testMethod()); } [TestMethod] public void Properties054_Test() @@ -247,7 +247,7 @@ public void Properties054_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass054.testMethod()); + Assert.IsTrue(PropertiesTestClass054.testMethod()); } [TestMethod] public void Properties056_Test() @@ -256,7 +256,7 @@ public void Properties056_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass056.testMethod()); + Assert.IsTrue(PropertiesTestClass056.testMethod()); } [TestMethod] public void Properties058_Test() @@ -265,7 +265,7 @@ public void Properties058_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass058.testMethod()); + Assert.IsTrue(PropertiesTestClass058.testMethod()); } [TestMethod] public void Properties059_Test() @@ -274,7 +274,7 @@ public void Properties059_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass059.testMethod()); + Assert.IsTrue(PropertiesTestClass059.testMethod()); } [TestMethod] public void Properties060_Test() @@ -283,7 +283,7 @@ public void Properties060_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass060.testMethod()); + Assert.IsTrue(PropertiesTestClass060.testMethod()); } [TestMethod] public void Properties062_Test() @@ -292,7 +292,7 @@ public void Properties062_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass062.testMethod()); + Assert.IsTrue(PropertiesTestClass062.testMethod()); } [TestMethod] public void Properties068_Test() @@ -301,7 +301,7 @@ public void Properties068_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass068.testMethod()); + Assert.IsTrue(PropertiesTestClass068.testMethod()); } [TestMethod] public void Properties071_Test() @@ -310,7 +310,7 @@ public void Properties071_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass071.testMethod()); + Assert.IsTrue(PropertiesTestClass071.testMethod()); } [TestMethod] public void Properties072_Test() @@ -319,7 +319,7 @@ public void Properties072_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass072.testMethod()); + Assert.IsTrue(PropertiesTestClass072.testMethod()); } [TestMethod] public void Properties073_Test() @@ -328,7 +328,7 @@ public void Properties073_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass073.testMethod()); + Assert.IsTrue(PropertiesTestClass073.testMethod()); } [TestMethod] public void Properties074_Test() @@ -337,7 +337,7 @@ public void Properties074_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass074.testMethod()); + Assert.IsTrue(PropertiesTestClass074.testMethod()); } [TestMethod] public void Properties075_Test() @@ -346,7 +346,7 @@ public void Properties075_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass075.testMethod()); + Assert.IsTrue(PropertiesTestClass075.testMethod()); } [TestMethod] public void Properties078_Test() @@ -355,7 +355,7 @@ public void Properties078_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass078.testMethod()); + Assert.IsTrue(PropertiesTestClass078.testMethod()); } [TestMethod] public void Properties089_Test() @@ -364,7 +364,7 @@ public void Properties089_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass089.testMethod()); + Assert.IsTrue(PropertiesTestClass089.testMethod()); } [TestMethod] public void Properties090_Test() @@ -373,7 +373,7 @@ public void Properties090_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass090.testMethod()); + Assert.IsTrue(PropertiesTestClass090.testMethod()); } [TestMethod] public void Properties097_Test() @@ -382,7 +382,7 @@ public void Properties097_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass097.testMethod()); + Assert.IsTrue(PropertiesTestClass097.testMethod()); } [TestMethod] public void Properties109_Test() @@ -391,7 +391,7 @@ public void Properties109_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass109.testMethod()); + Assert.IsTrue(PropertiesTestClass109.testMethod()); } [TestMethod] public void Properties110_Test() @@ -400,7 +400,7 @@ public void Properties110_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass110.testMethod()); + Assert.IsTrue(PropertiesTestClass110.testMethod()); } [TestMethod] public void Properties121_Test() @@ -409,7 +409,7 @@ public void Properties121_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass121.testMethod()); + Assert.IsTrue(PropertiesTestClass121.testMethod()); } [TestMethod] public void Properties122_Test() @@ -418,7 +418,7 @@ public void Properties122_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass122.testMethod()); + Assert.IsTrue(PropertiesTestClass122.testMethod()); } [TestMethod] public void Properties123_Test() @@ -428,7 +428,7 @@ public void Properties123_Test() OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); OutputHelper.WriteLine("This test is an expected fail"); - Assert.False(PropertiesTestClass123.testMethod()); + Assert.IsFalse(PropertiesTestClass123.testMethod()); } [TestMethod] public void Properties124_Test() @@ -438,7 +438,7 @@ public void Properties124_Test() OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); OutputHelper.WriteLine("This test is an expected fail"); - Assert.False(PropertiesTestClass124.testMethod()); + Assert.IsFalse(PropertiesTestClass124.testMethod()); } [TestMethod] public void Properties125_Test() @@ -447,7 +447,7 @@ public void Properties125_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass125.testMethod()); + Assert.IsTrue(PropertiesTestClass125.testMethod()); } [TestMethod] public void Properties126_Test() @@ -456,7 +456,7 @@ public void Properties126_Test() OutputHelper.WriteLine("Each accessor declaration consists of an"); OutputHelper.WriteLine("optional accessor-modifier, followed by the"); OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - Assert.True(PropertiesTestClass126.testMethod()); + Assert.IsTrue(PropertiesTestClass126.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestClasses/UnitTestStaticTests.cs b/Tests/NFUnitTestClasses/UnitTestStaticTests.cs index 9a8b98c9..41702ea0 100644 --- a/Tests/NFUnitTestClasses/UnitTestStaticTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestStaticTests.cs @@ -20,7 +20,7 @@ public void Static_Inst01_Test() OutputHelper.WriteLine(" When a static member is referenced in a member-access"); OutputHelper.WriteLine(" of the form E.M, E must denote a type. It is an error for"); OutputHelper.WriteLine(" E to denote an instance."); - Assert.True(Static_InstTestClass01.testMethod()); + Assert.IsTrue(Static_InstTestClass01.testMethod()); } [TestMethod] @@ -30,7 +30,7 @@ public void Static_Inst07_Test() OutputHelper.WriteLine(" A static field identifies exactly one storage location."); OutputHelper.WriteLine(" No matter how many instances of a class are created,"); OutputHelper.WriteLine(" there is only ever one copy of a static field."); - Assert.True(Static_InstTestClass07.testMethod()); + Assert.IsTrue(Static_InstTestClass07.testMethod()); } [TestMethod] @@ -40,7 +40,7 @@ public void Static_Inst14_Test() OutputHelper.WriteLine(" When an instance member is referenced in a member-access"); OutputHelper.WriteLine(" of the form E.M, E must denote an instance. It is an error "); OutputHelper.WriteLine(" for E to denote a type."); - Assert.True(Static_InstTestClass14.testMethod()); + Assert.IsTrue(Static_InstTestClass14.testMethod()); } [TestMethod] @@ -49,7 +49,7 @@ public void Static_Inst18_Test() OutputHelper.WriteLine(" Section 10.2 "); OutputHelper.WriteLine(" Every instance of a class contains a separate copy "); OutputHelper.WriteLine(" of all instance fields of the class."); - Assert.True(Static_InstTestClass18.testMethod()); + Assert.IsTrue(Static_InstTestClass18.testMethod()); } [TestMethod] @@ -61,7 +61,7 @@ public void Static_Inst19_Test() OutputHelper.WriteLine(" destructor) operates on a given instance of "); OutputHelper.WriteLine(" the class, and this instance can be accessed as"); OutputHelper.WriteLine(" this."); - Assert.True(Static_InstTestClass19.testMethod()); + Assert.IsTrue(Static_InstTestClass19.testMethod()); } [TestMethod] @@ -73,7 +73,7 @@ public void Static_Inst20_Test() OutputHelper.WriteLine(" destructor) operates on a given instance of "); OutputHelper.WriteLine(" the class, and this instance can be accessed as"); OutputHelper.WriteLine(" this."); - Assert.True(Static_InstTestClass20.testMethod()); + Assert.IsTrue(Static_InstTestClass20.testMethod()); } [TestMethod] @@ -85,7 +85,7 @@ public void Static_Inst21_Test() OutputHelper.WriteLine(" destructor) operates on a given instance of "); OutputHelper.WriteLine(" the class, and this instance can be accessed as"); OutputHelper.WriteLine(" this."); - Assert.True(Static_InstTestClass21.testMethod()); + Assert.IsTrue(Static_InstTestClass21.testMethod()); } [TestMethod] @@ -97,7 +97,7 @@ public void Static_Inst22_Test() OutputHelper.WriteLine(" destructor) operates on a given instance of "); OutputHelper.WriteLine(" the class, and this instance can be accessed as"); OutputHelper.WriteLine(" this."); - Assert.True(Static_InstTestClass22.testMethod()); + Assert.IsTrue(Static_InstTestClass22.testMethod()); } [TestMethod] @@ -109,7 +109,7 @@ public void Static_Inst23_Test() OutputHelper.WriteLine(" destructor) operates on a given instance of "); OutputHelper.WriteLine(" the class, and this instance can be accessed as"); OutputHelper.WriteLine(" this."); - Assert.True(Static_InstTestClass23.testMethod()); + Assert.IsTrue(Static_InstTestClass23.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestConversions/NFUnitTestConversions.nfproj b/Tests/NFUnitTestConversions/NFUnitTestConversions.nfproj index cd6d2ac7..f038ee9c 100644 --- a/Tests/NFUnitTestConversions/NFUnitTestConversions.nfproj +++ b/Tests/NFUnitTestConversions/NFUnitTestConversions.nfproj @@ -36,7 +36,7 @@ - + @@ -46,6 +46,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestConversions/UnitTestBoxingTests.cs b/Tests/NFUnitTestConversions/UnitTestBoxingTests.cs index d1c616bc..8355ec60 100644 --- a/Tests/NFUnitTestConversions/UnitTestBoxingTests.cs +++ b/Tests/NFUnitTestConversions/UnitTestBoxingTests.cs @@ -15,79 +15,79 @@ public class UnitTestBoxingTests [TestMethod] public void Boxingbyte_Test() { - Assert.True(BoxingTestClassbyte.testMethod()); + Assert.IsTrue(BoxingTestClassbyte.testMethod()); } [TestMethod] public void Boxingchar_Test() { - Assert.True(BoxingTestClasschar.testMethod()); + Assert.IsTrue(BoxingTestClasschar.testMethod()); } [TestMethod] public void Boxingdouble_Test() { - Assert.True(BoxingTestClassdouble.testMethod()); + Assert.IsTrue(BoxingTestClassdouble.testMethod()); } [TestMethod] public void Boxingfloat_Test() { - Assert.True(BoxingTestClassfloat.testMethod()); + Assert.IsTrue(BoxingTestClassfloat.testMethod()); } [TestMethod] public void Boxingint_Test() { - Assert.True(BoxingTestClassint.testMethod()); + Assert.IsTrue(BoxingTestClassint.testMethod()); } [TestMethod] public void Boxinglong_Test() { - Assert.True(BoxingTestClasslong.testMethod()); + Assert.IsTrue(BoxingTestClasslong.testMethod()); } [TestMethod] public void Boxingsbyte_Test() { - Assert.True(BoxingTestClasssbyte.testMethod()); + Assert.IsTrue(BoxingTestClasssbyte.testMethod()); } [TestMethod] public void Boxingshort_Test() { - Assert.True(BoxingTestClassshort.testMethod()); + Assert.IsTrue(BoxingTestClassshort.testMethod()); } [TestMethod] public void Boxinguint_Test() { - Assert.True(BoxingTestClassuint.testMethod()); + Assert.IsTrue(BoxingTestClassuint.testMethod()); } [TestMethod] public void Boxingulong_Test() { - Assert.True(BoxingTestClassulong.testMethod()); + Assert.IsTrue(BoxingTestClassulong.testMethod()); } [TestMethod] public void Boxingushort_Test() { - Assert.True(BoxingTestClassushort.testMethod()); + Assert.IsTrue(BoxingTestClassushort.testMethod()); } [TestMethod] public void Boxingstruct_to_ValType_Test() { - Assert.True(BoxingTestClassStruct_to_ValType.testMethod()); + Assert.IsTrue(BoxingTestClassStruct_to_ValType.testMethod()); } [TestMethod] public void BoxingValType_to_struct_Test() { - Assert.True(BoxingTestClassValType_to_struct.testMethod()); + Assert.IsTrue(BoxingTestClassValType_to_struct.testMethod()); } diff --git a/Tests/NFUnitTestConversions/UnitTestConvertTests.cs b/Tests/NFUnitTestConversions/UnitTestConvertTests.cs index c5afd2e3..eee53f0d 100644 --- a/Tests/NFUnitTestConversions/UnitTestConvertTests.cs +++ b/Tests/NFUnitTestConversions/UnitTestConvertTests.cs @@ -31,21 +31,21 @@ public void Cast_FloatingPoint() d1 = (double)u1; // Does not work correctly (d1 is close to 0) u2 = (uint)d1; - Assert.Equal(d1, u1); - Assert.Equal(u2, u1); + Assert.AreEqual(d1, u1); + Assert.AreEqual(u2, u1); f1 = (float)u1; // Same problem - Assert.Equal(f1, u1); + Assert.AreEqual(f1, u1); l1 = (long)u1; u2 = (uint)l1; - Assert.Equal(l1, u1); - Assert.Equal(u2, u1); + Assert.AreEqual(l1, u1); + Assert.AreEqual(u2, u1); d2 = l1; // Same problem l2 = (long)d2; - Assert.Equal(d2, l1); - Assert.Equal(l2, l1); + Assert.AreEqual(d2, l1); + Assert.AreEqual(l2, l1); } } @@ -54,21 +54,21 @@ public void Convert_Positive() { string number = "12"; SByte value_sb = Convert.ToSByte(number); - Assert.Equal(value_sb, (byte)12); + Assert.AreEqual(value_sb, (byte)12); Byte value_b = Convert.ToByte(number); - Assert.Equal(value_b, (byte)12); + Assert.AreEqual(value_b, (byte)12); Int16 value_s16 = Convert.ToInt16(number); - Assert.Equal(value_s16, (short)12); + Assert.AreEqual(value_s16, (short)12); UInt16 value_u16 = Convert.ToUInt16(number); - Assert.Equal(value_u16, (ushort)12); + Assert.AreEqual(value_u16, (ushort)12); Int32 value_s32 = Convert.ToInt32(number); - Assert.Equal(value_s32, (int)12); + Assert.AreEqual(value_s32, (int)12); UInt32 value_u32 = Convert.ToUInt32(number); - Assert.Equal(value_u32, (uint)12); + Assert.AreEqual(value_u32, (uint)12); Int64 value_s64 = Convert.ToInt32(number); - Assert.Equal(value_s64, (long)12); + Assert.AreEqual(value_s64, (long)12); UInt64 value_u64 = Convert.ToUInt64(number); - Assert.Equal(value_u64, (ulong)12); + Assert.AreEqual(value_u64, (ulong)12); } [TestMethod] @@ -76,21 +76,21 @@ public void Convert_PositivePlus() { string number = "+12"; SByte value_sb = Convert.ToSByte(number); - Assert.Equal(value_sb, (byte)12); + Assert.AreEqual(value_sb, (byte)12); Byte value_b = Convert.ToByte(number); - Assert.Equal(value_b, (byte)12); + Assert.AreEqual(value_b, (byte)12); Int16 value_s16 = Convert.ToInt16(number); - Assert.Equal(value_s16, (short)12); + Assert.AreEqual(value_s16, (short)12); UInt16 value_u16 = Convert.ToUInt16(number); - Assert.Equal(value_u16, (ushort)12); + Assert.AreEqual(value_u16, (ushort)12); Int32 value_s32 = Convert.ToInt32(number); - Assert.Equal(value_s32, (int)12); + Assert.AreEqual(value_s32, (int)12); UInt32 value_u32 = Convert.ToUInt32(number); - Assert.Equal(value_u32, (uint)12); + Assert.AreEqual(value_u32, (uint)12); Int64 value_s64 = Convert.ToInt32(number); - Assert.Equal(value_s64, (long)12); + Assert.AreEqual(value_s64, (long)12); UInt64 value_u64 = Convert.ToUInt64(number); - Assert.Equal(value_u64, (ulong)12); + Assert.AreEqual(value_u64, (ulong)12); } @@ -100,17 +100,17 @@ public void Convert_Negative() string number = "-12"; int actualNumber = -12; SByte value_sb = Convert.ToSByte(number); - Assert.Equal(value_sb, (sbyte)actualNumber, "Test1"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { Byte value_b = Convert.ToByte(number); }, "Test2"); + Assert.AreEqual(value_sb, (sbyte)actualNumber, "Test1"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { Byte value_b = Convert.ToByte(number); }, "Test2"); Int16 value_s16 = Convert.ToInt16(number); - Assert.Equal(value_s16, (short)actualNumber, "Test3"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { UInt16 value_u16 = Convert.ToUInt16(number); }, "Test4"); + Assert.AreEqual(value_s16, (short)actualNumber, "Test3"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { UInt16 value_u16 = Convert.ToUInt16(number); }, "Test4"); Int32 value_s32 = Convert.ToInt32(number); - Assert.Equal(value_s32, (int)actualNumber, "Test5"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { UInt32 value_u32 = Convert.ToUInt32(number); }, "Test6"); + Assert.AreEqual(value_s32, (int)actualNumber, "Test5"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { UInt32 value_u32 = Convert.ToUInt32(number); }, "Test6"); Int64 value_s64 = Convert.ToInt32(number); - Assert.Equal(value_s64, (long)actualNumber, "Test7"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { UInt64 value_u64 = Convert.ToUInt64(number); }, "Test8"); + Assert.AreEqual(value_s64, (long)actualNumber, "Test7"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { UInt64 value_u64 = Convert.ToUInt64(number); }, "Test8"); } [TestMethod] @@ -120,10 +120,10 @@ public void Convert_Double() double actualNumber = 36.123456; double value_dd = Convert.ToDouble(number); - Assert.Equal(value_dd, actualNumber); + Assert.AreEqual(value_dd, actualNumber); - Assert.Equal(-129, Convert.ToDouble("-129"), "The value '-129' did not parse to -129"); // can't handle not having a decimal point! - Assert.Equal(-123.456, Convert.ToDouble("-123.456"), "The value -123.456 did not parse to -123.456"); + Assert.AreEqual(-129, Convert.ToDouble("-129"), "The value '-129' did not parse to -129"); // can't handle not having a decimal point! + Assert.AreEqual(-123.456, Convert.ToDouble("-123.456"), "The value -123.456 did not parse to -123.456"); } [TestMethod] @@ -133,8 +133,8 @@ public void Convert_Plus() double actualNumber = 36.123456; double value_dd = Convert.ToDouble(number); - Assert.Equal(value_dd, actualNumber); - Assert.Equal(0, Convert.ToDouble("+0"), "The string +0 did not parse to 0 for Double"); + Assert.AreEqual(value_dd, actualNumber); + Assert.AreEqual(0, Convert.ToDouble("+0"), "The string +0 did not parse to 0 for Double"); } [TestMethod] @@ -160,11 +160,11 @@ public void Convert_Whitespace() long actualInt = -3484; double actualNumber = 36.123456; - Assert.Equal(actualInt, Convert.ToInt16(intnum)); - Assert.Equal(actualInt, Convert.ToInt32(intnum)); - Assert.Equal(actualInt, Convert.ToInt64(intnum)); + Assert.AreEqual(actualInt, Convert.ToInt16(intnum)); + Assert.AreEqual(actualInt, Convert.ToInt32(intnum)); + Assert.AreEqual(actualInt, Convert.ToInt64(intnum)); double value_dd = Convert.ToDouble(number); - Assert.Equal(value_dd, actualNumber); + Assert.AreEqual(value_dd, actualNumber); } [TestMethod] @@ -175,7 +175,7 @@ public void Convert_DoubleNormalizeNeg() double value_dd = Convert.ToDouble(number); - Assert.Equal(value_dd, actualNumber, $"Convert.ToDouble should be {number}"); // this works if the numbers are fairly small - i.e. not e^x sized + Assert.AreEqual(value_dd, actualNumber, $"Convert.ToDouble should be {number}"); // this works if the numbers are fairly small - i.e. not e^x sized // Examples of how we can get differences due to differences between the compiler parser, and the native parser // And differences caused by the native parsers "fast speed" causing rounding errors @@ -189,14 +189,14 @@ public void Convert_DoubleNormalizeNeg() // Now we will compare some of the ToString values // compare native to native - but parsing e-3 versus e-12 means 9 more loops thru the double multiplication where rounding can occur so this won't work for all numbers - Assert.Equal(dnum1Native.ToString(), dnum2Native.ToString(), $"Comparing native parse tostring"); + Assert.AreEqual(dnum1Native.ToString(), dnum2Native.ToString(), $"Comparing native parse tostring"); // compare roslyn to roslyn - the roslyn parser is more accurate and that means the double is much more likely to be the same - Assert.Equal(dnum1Roslyn.ToString(), dnum2Roslyn.ToString(), $"Comparing Roslyn parse tostring"); + Assert.AreEqual(dnum1Roslyn.ToString(), dnum2Roslyn.ToString(), $"Comparing Roslyn parse tostring"); // Now mix things up - Assert.Equal(dnum1Roslyn.ToString(), dnum2Native.ToString(), $"Comparing Roslyn parse and native parse tostring"); - Assert.Equal(dnum1Native.ToString(), dnum2Roslyn.ToString(), $"Comparing Roslyn parse and native parse tostring"); - Assert.Equal(dnum1Roslyn.ToString(), dnum1Native.ToString(), $"Comparing Roslyn to native using {num1}"); - Assert.Equal(dnum2Roslyn.ToString(), dnum2Native.ToString(), $"Comparing Roslyn to natvie using {num2}"); + Assert.AreEqual(dnum1Roslyn.ToString(), dnum2Native.ToString(), $"Comparing Roslyn parse and native parse tostring"); + Assert.AreEqual(dnum1Native.ToString(), dnum2Roslyn.ToString(), $"Comparing Roslyn parse and native parse tostring"); + Assert.AreEqual(dnum1Roslyn.ToString(), dnum1Native.ToString(), $"Comparing Roslyn to native using {num1}"); + Assert.AreEqual(dnum2Roslyn.ToString(), dnum2Native.ToString(), $"Comparing Roslyn to natvie using {num2}"); } [TestMethod] @@ -207,17 +207,17 @@ public void Convert_HexInt() int value = Convert.ToInt32(number, 16); - Assert.Equal(value, actualNumber); + Assert.AreEqual(value, actualNumber); number = "0x89abcdef"; unchecked { actualNumber = (int)0x89abcdef; } - Assert.Equal(actualNumber, Convert.ToInt32(number, 16)); + Assert.AreEqual(actualNumber, Convert.ToInt32(number, 16)); number = "0x0AbF83C"; actualNumber = 0xAbF83C; - Assert.Equal(actualNumber, Convert.ToInt32(number, 16)); + Assert.AreEqual(actualNumber, Convert.ToInt32(number, 16)); } [TestMethod] @@ -256,117 +256,117 @@ public void Convert_BoundaryValues() // boundary: double max string time = DateTime.UtcNow.ToString("hh:mm:ss"); double doubleMax = double.MaxValue; - Assert.Equal(doubleMax.ToString(), OUT_OF_RANGE, "nanoPrintf returns oor for double > 2^64-2"); - Assert.Equal(DoubleToHex(doubleMax), DOUBLE_MAX_HEX, "Hex value to double max value does not match"); - Assert.Equal(DoubleToHex(Convert.ToDouble(DOUBLE_MAX_VAL)), DOUBLE_MAX_HEX, "Parsing double max value does not return correct hex value"); + Assert.AreEqual(doubleMax.ToString(), OUT_OF_RANGE, "nanoPrintf returns oor for double > 2^64-2"); + Assert.AreEqual(DoubleToHex(doubleMax), DOUBLE_MAX_HEX, "Hex value to double max value does not match"); + Assert.AreEqual(DoubleToHex(Convert.ToDouble(DOUBLE_MAX_VAL)), DOUBLE_MAX_HEX, "Parsing double max value does not return correct hex value"); // boundary: double min double doubleMin = double.MinValue; - Assert.Equal(doubleMin.ToString(), OUT_OF_RANGE_NEG, "nanoPrintf returns oor for double < -2^64+2"); - Assert.Equal(DoubleToHex(doubleMin), DOUBLE_MIN_HEX,"Hex value to double min value does not match"); - Assert.Equal(DoubleToHex(Convert.ToDouble(DOUBLE_MIN_VAL)), DOUBLE_MIN_HEX, "Parsing double min value does not return correct hex value"); + Assert.AreEqual(doubleMin.ToString(), OUT_OF_RANGE_NEG, "nanoPrintf returns oor for double < -2^64+2"); + Assert.AreEqual(DoubleToHex(doubleMin), DOUBLE_MIN_HEX,"Hex value to double min value does not match"); + Assert.AreEqual(DoubleToHex(Convert.ToDouble(DOUBLE_MIN_VAL)), DOUBLE_MIN_HEX, "Parsing double min value does not return correct hex value"); // boundary: double zero double doubleZero = 0; // test that zero gets a zero exponent and a value like 1023 the exponent bias used in floating point math - Assert.Equal(doubleZero.ToString(), "0", "ToString of a double with zero value formats incorrectly"); - Assert.Equal(DoubleToHex(doubleZero), DOUBLE_ZERO_HEX, "Double with zero value returns the wrong hex value"); + Assert.AreEqual(doubleZero.ToString(), "0", "ToString of a double with zero value formats incorrectly"); + Assert.AreEqual(DoubleToHex(doubleZero), DOUBLE_ZERO_HEX, "Double with zero value returns the wrong hex value"); // boundary: double largest-in-range double doubleInRange = Convert.ToDouble(DOUBLE_LARGEST_PRINT); - Assert.Equal(doubleInRange.ToString(), DOUBLE_LARGEST_PRINT, "Double.ToString did not return the correct value for largest in range value"); + Assert.AreEqual(doubleInRange.ToString(), DOUBLE_LARGEST_PRINT, "Double.ToString did not return the correct value for largest in range value"); // boundary: double largest-out-of-range double doubleOutRange = Convert.ToDouble(DOUBLE_LARGESTINVALID_PRINT); - Assert.Equal(doubleOutRange.ToString(), OUT_OF_RANGE, "Double.ToString did not return 'oor' for first out-of-range value"); + Assert.AreEqual(doubleOutRange.ToString(), OUT_OF_RANGE, "Double.ToString did not return 'oor' for first out-of-range value"); // boundary: double smallest-in-range double doubleInRangeNeg = Convert.ToDouble(DOUBLE_SMALLEST_PRINT); - Assert.Equal(doubleInRangeNeg.ToString(), DOUBLE_SMALLEST_PRINT, "Double.ToString did not return the correct value for smallest in range value"); + Assert.AreEqual(doubleInRangeNeg.ToString(), DOUBLE_SMALLEST_PRINT, "Double.ToString did not return the correct value for smallest in range value"); // boundary: double smallest-out-of-range double doubleOutRangeNeg = Convert.ToDouble(DOUBLE_SMALLESTINVALID_PRINT); - Assert.Equal(doubleOutRangeNeg.ToString(), OUT_OF_RANGE_NEG, "Double.ToString did not return 'oor' for smallest out-of-range value"); + Assert.AreEqual(doubleOutRangeNeg.ToString(), OUT_OF_RANGE_NEG, "Double.ToString did not return 'oor' for smallest out-of-range value"); // boundary: float max float floatMax = float.MaxValue; - Assert.Equal(floatMax.ToString(), OUT_OF_RANGE, "nanoPrintf return oor for float > 2^64-2"); - Assert.Equal(FloatToHex(floatMax), FLOAT_MAX_HEX, "Hex value to float max values does not match"); - Assert.Equal(FloatToHex((float)Convert.ToDouble(FLOAT_MAX_VAL)), FLOAT_MAX_HEX, "Parsing float max value does not return correct hex value"); + Assert.AreEqual(floatMax.ToString(), OUT_OF_RANGE, "nanoPrintf return oor for float > 2^64-2"); + Assert.AreEqual(FloatToHex(floatMax), FLOAT_MAX_HEX, "Hex value to float max values does not match"); + Assert.AreEqual(FloatToHex((float)Convert.ToDouble(FLOAT_MAX_VAL)), FLOAT_MAX_HEX, "Parsing float max value does not return correct hex value"); // boundary: float min float floatMin = float.MinValue; - Assert.Equal(floatMin.ToString(), OUT_OF_RANGE_NEG, "nanoPrintf returns oor for float < -2^64+2"); - Assert.Equal(FloatToHex(floatMin), FLOAT_MIN_HEX, "Hex value to double min value does not match"); - Assert.Equal(FloatToHex((float)Convert.ToDouble(FLOAT_MIN_VAL)), FLOAT_MIN_HEX, "Parsing float min value does not return correct hex value"); + Assert.AreEqual(floatMin.ToString(), OUT_OF_RANGE_NEG, "nanoPrintf returns oor for float < -2^64+2"); + Assert.AreEqual(FloatToHex(floatMin), FLOAT_MIN_HEX, "Hex value to double min value does not match"); + Assert.AreEqual(FloatToHex((float)Convert.ToDouble(FLOAT_MIN_VAL)), FLOAT_MIN_HEX, "Parsing float min value does not return correct hex value"); //boundary: float zero float floatZero = 0; // test that zero gets a zero exponent and not a value like 1023 the exponent bias used in floating point math - Assert.Equal(floatZero.ToString(), "0", "ToString of a string with zero value formats incorrectly"); - Assert.Equal(FloatToHex(floatZero), FLOAT_ZERO_HEX, "Float with zero value returns the wrong hex value"); + Assert.AreEqual(floatZero.ToString(), "0", "ToString of a string with zero value formats incorrectly"); + Assert.AreEqual(FloatToHex(floatZero), FLOAT_ZERO_HEX, "Float with zero value returns the wrong hex value"); // boundary: float largest-in-range float floatInRange = (float)Convert.ToDouble(FLOAT_LARGEST_PRINT); - Assert.Equal(floatInRange.ToString(), FLOAT_LARGEST_PRINT, "Float.ToString did not return the correct value for largest in range value"); + Assert.AreEqual(floatInRange.ToString(), FLOAT_LARGEST_PRINT, "Float.ToString did not return the correct value for largest in range value"); // boundary: float largest-out-of-range float floatOutRange = (float)Convert.ToDouble(FLOAT_LARGESTINVALID_PRINT); - Assert.Equal(floatOutRange.ToString(), OUT_OF_RANGE, "Float.ToString did not return 'oor' for first out-of-range value"); + Assert.AreEqual(floatOutRange.ToString(), OUT_OF_RANGE, "Float.ToString did not return 'oor' for first out-of-range value"); // boundary: float smallest-in-range float floatInRangeNeg = (float)Convert.ToDouble(FLOAT_SMALLEST_PRINT); - Assert.Equal(floatInRangeNeg.ToString(), FLOAT_SMALLEST_PRINT, "Float.ToString did not return the correct value for smallest in range value"); + Assert.AreEqual(floatInRangeNeg.ToString(), FLOAT_SMALLEST_PRINT, "Float.ToString did not return the correct value for smallest in range value"); // boundary: float smallest-out-of-range float floatOutRangeNeg = (float)Convert.ToDouble(FLOAT_SMALLESTINVALID_PRINT); - Assert.Equal(floatOutRangeNeg.ToString(), OUT_OF_RANGE_NEG, "Float.ToString did not return 'oor' for smallest out-of-range value"); + Assert.AreEqual(floatOutRangeNeg.ToString(), OUT_OF_RANGE_NEG, "Float.ToString did not return 'oor' for smallest out-of-range value"); long lMax = long.MaxValue; string numMax = lMax.ToString(); long lMin = long.MinValue; string numMin = lMin.ToString(); - Assert.Equal(lMax, Convert.ToInt64(numMax), "Int64 Max"); - Assert.Equal(lMin, Convert.ToInt64(numMin), "Int64 Min"); + Assert.AreEqual(lMax, Convert.ToInt64(numMax), "Int64 Max"); + Assert.AreEqual(lMin, Convert.ToInt64(numMin), "Int64 Min"); ulong ulMax = ulong.MaxValue; numMax = ulMax.ToString(); ulong ulMin = ulong.MinValue; numMin = ulMin.ToString(); - Assert.Equal(ulMax, Convert.ToUInt64(numMax), "UInt64 Max"); - Assert.Equal(ulMin, Convert.ToUInt64(numMin), "UInt64 Min"); + Assert.AreEqual(ulMax, Convert.ToUInt64(numMax), "UInt64 Max"); + Assert.AreEqual(ulMin, Convert.ToUInt64(numMin), "UInt64 Min"); long iMax = int.MaxValue; numMax = iMax.ToString(); long iMin = int.MinValue; numMin = iMin.ToString(); - Assert.Equal(iMax, Convert.ToInt32(numMax), "Int32 Max"); - Assert.Equal(iMin, Convert.ToInt32(numMin), "Int32 Min"); + Assert.AreEqual(iMax, Convert.ToInt32(numMax), "Int32 Max"); + Assert.AreEqual(iMin, Convert.ToInt32(numMin), "Int32 Min"); uint uiMax = uint.MaxValue; numMax = uiMax.ToString(); uint uiMin = uint.MinValue; numMin = uiMin.ToString(); - Assert.Equal(uiMax, Convert.ToUInt32(numMax)); - Assert.Equal(uiMin, Convert.ToUInt32(numMin)); + Assert.AreEqual(uiMax, Convert.ToUInt32(numMax)); + Assert.AreEqual(uiMin, Convert.ToUInt32(numMin)); short sMax = short.MaxValue; numMax = sMax.ToString(); short sMin = short.MinValue; numMin = sMin.ToString(); - Assert.Equal(sMax, Convert.ToInt16(numMax)); - Assert.Equal(sMin, Convert.ToInt16(numMin)); + Assert.AreEqual(sMax, Convert.ToInt16(numMax)); + Assert.AreEqual(sMin, Convert.ToInt16(numMin)); ushort usMax = ushort.MaxValue; numMax = usMax.ToString(); ushort usMin = ushort.MinValue; numMin = usMin.ToString(); - Assert.Equal(usMax, Convert.ToUInt16(numMax)); - Assert.Equal(usMin, Convert.ToUInt16(numMin)); + Assert.AreEqual(usMax, Convert.ToUInt16(numMax)); + Assert.AreEqual(usMin, Convert.ToUInt16(numMin)); sbyte sbMax = sbyte.MaxValue; numMax = sbMax.ToString(); @@ -377,16 +377,16 @@ public void Convert_BoundaryValues() sbMin = Convert.ToSByte(numMin); - Assert.Equal(sbMax, Convert.ToSByte(numMax)); - Assert.Equal(sbMin, Convert.ToSByte(numMin)); + Assert.AreEqual(sbMax, Convert.ToSByte(numMax)); + Assert.AreEqual(sbMin, Convert.ToSByte(numMin)); byte bMax = byte.MaxValue; numMax = bMax.ToString(); byte bMin = byte.MinValue; numMin = bMin.ToString(); - Assert.Equal(bMax, Convert.ToByte(numMax)); - Assert.Equal(bMin, Convert.ToByte(numMin)); + Assert.AreEqual(bMax, Convert.ToByte(numMax)); + Assert.AreEqual(bMin, Convert.ToByte(numMin)); } @@ -396,21 +396,21 @@ public void Convert_LeadingZeroValues() { string number = "00000000"; - Assert.Equal((short)0, Convert.ToInt16(number)); - Assert.Equal(0, Convert.ToInt32(number)); - Assert.Equal(0, Convert.ToInt64(number)); + Assert.AreEqual((short)0, Convert.ToInt16(number)); + Assert.AreEqual(0, Convert.ToInt32(number)); + Assert.AreEqual(0, Convert.ToInt64(number)); number = "+00000000000"; - Assert.Equal((short)0, Convert.ToInt16(number)); - Assert.Equal(0, Convert.ToInt32(number)); - Assert.Equal(0, Convert.ToInt64(number)); + Assert.AreEqual((short)0, Convert.ToInt16(number)); + Assert.AreEqual(0, Convert.ToInt32(number)); + Assert.AreEqual(0, Convert.ToInt64(number)); number = "-00000000000"; - Assert.Equal((short)0, Convert.ToInt16(number)); - Assert.Equal(0, Convert.ToInt32(number)); - Assert.Equal(0, Convert.ToInt64(number)); + Assert.AreEqual((short)0, Convert.ToInt16(number)); + Assert.AreEqual(0, Convert.ToInt32(number)); + Assert.AreEqual(0, Convert.ToInt64(number)); } [TestMethod] @@ -419,34 +419,34 @@ public void Convert_LeadingZeros() string number = "000003984"; int actualNumber = 3984; - Assert.Equal((short)actualNumber, Convert.ToInt16(number)); - Assert.Equal(actualNumber, Convert.ToInt32(number)); - Assert.Equal(actualNumber, Convert.ToInt64(number)); + Assert.AreEqual((short)actualNumber, Convert.ToInt16(number)); + Assert.AreEqual(actualNumber, Convert.ToInt32(number)); + Assert.AreEqual(actualNumber, Convert.ToInt64(number)); number = "-00000003489"; actualNumber = -3489; - Assert.Equal((short)actualNumber, Convert.ToInt16(number)); - Assert.Equal(actualNumber, Convert.ToInt32(number)); - Assert.Equal(actualNumber, Convert.ToInt64(number)); + Assert.AreEqual((short)actualNumber, Convert.ToInt16(number)); + Assert.AreEqual(actualNumber, Convert.ToInt32(number)); + Assert.AreEqual(actualNumber, Convert.ToInt64(number)); number = "+00000003489"; actualNumber = 3489; - Assert.Equal((short)actualNumber, Convert.ToInt16(number)); - Assert.Equal(actualNumber, Convert.ToInt32(number)); - Assert.Equal(actualNumber, Convert.ToInt64(number)); + Assert.AreEqual((short)actualNumber, Convert.ToInt16(number)); + Assert.AreEqual(actualNumber, Convert.ToInt32(number)); + Assert.AreEqual(actualNumber, Convert.ToInt64(number)); number = "+000000043984.00048850000"; double numD = 4.39840004885; - Assert.NotEqual(numD, Convert.ToDouble(number)); + Assert.AreNotEqual(numD, Convert.ToDouble(number)); number = "-000000043984.00048850000"; numD = -4.39840004885; - Assert.NotEqual(numD, Convert.ToDouble(number)); + Assert.AreNotEqual(numD, Convert.ToDouble(number)); number = "000000043984.000488500e-006"; numD = 4.39840004885e2; - Assert.NotEqual(numD, Convert.ToDouble(number)); + Assert.AreNotEqual(numD, Convert.ToDouble(number)); } [TestMethod] @@ -462,7 +462,7 @@ public void Convert_64ParsePerf() } OutputHelper.WriteLine("Time: " + (DateTime.UtcNow - start).ToString()); - Assert.Equal(val, -7446744073709551615L); + Assert.AreEqual(val, -7446744073709551615L); } [TestMethod] @@ -474,8 +474,8 @@ public void Convert_FromBoolean() byte convTrueIsOne = Convert.ToByte(iamTrue); byte convFalseIsZero = Convert.ToByte(iamFalse); - Assert.Equals(convTrueIsOne, 1); - Assert.Equals(convFalseIsZero, 0); + Assert.AreEqual(convTrueIsOne, (byte)1); + Assert.AreEqual(convFalseIsZero, (byte)0); } #region Double/Floating point number helpers @@ -537,14 +537,14 @@ public void Convert_FromToBase64() string sharedAccessKeyAsString = new(charArray); - Assert.Equal(sharedAccessKeyAsString, sharedAccessKeyPlainText, "Converted string as byte array is not correct."); + Assert.AreEqual(sharedAccessKeyAsString, sharedAccessKeyPlainText, "Converted string as byte array is not correct."); string convertedFromBase64 = Convert.ToBase64String(sharedAccessKeyAsByte); OutputHelper.WriteLine($">>{convertedFromBase64}"); OutputHelper.WriteLine($">>{sharedAccessKey}"); - Assert.Equal(convertedFromBase64, sharedAccessKey, "Converted string from byte array is not correct."); + Assert.AreEqual(convertedFromBase64, sharedAccessKey, "Converted string from byte array is not correct."); } [TestMethod] diff --git a/Tests/NFUnitTestConversions/UnitTestExprefTests.cs b/Tests/NFUnitTestConversions/UnitTestExprefTests.cs index 6b8df165..2400dcb3 100644 --- a/Tests/NFUnitTestConversions/UnitTestExprefTests.cs +++ b/Tests/NFUnitTestConversions/UnitTestExprefTests.cs @@ -17,7 +17,7 @@ class UnitTestExprefTests public void Expref_obj_ref_Test() { OutputHelper.WriteLine(" Converting from 'object' to a reference object. "); - Assert.True(ExprefTestClass_obj_ref.testMethod()); + Assert.IsTrue(ExprefTestClass_obj_ref.testMethod()); } [TestMethod] @@ -25,7 +25,7 @@ public void Expref_obj_ref_exc_Test() { OutputHelper.WriteLine(" Converting from 'object' to a reference object. "); - Assert.True(ExprefTestClass_obj_ref_exc.testMethod()); + Assert.IsTrue(ExprefTestClass_obj_ref_exc.testMethod()); } [TestMethod] @@ -33,7 +33,7 @@ public void Expref_class_class_Test() { OutputHelper.WriteLine(" Tests that you can convert from a base class to a derived class"); - Assert.True(ExprefTestClass_class_class.testMethod()); + Assert.IsTrue(ExprefTestClass_class_class.testMethod()); } [TestMethod] @@ -41,7 +41,7 @@ public void Expref_class_class_exc_Test() { OutputHelper.WriteLine(" Tests that you can convert from a base class to a derived class"); - Assert.True(ExprefTestClass_class_class_exc.testMethod()); + Assert.IsTrue(ExprefTestClass_class_class_exc.testMethod()); } [TestMethod] @@ -49,21 +49,21 @@ public void Expref_inter_struct_exc_Test() { OutputHelper.WriteLine(" Tests that you can convert from an interface to a struct that implements it."); - Assert.True(ExprefTestClass_inter_struct_exc.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_struct_exc.testMethod()); } [TestMethod] public void Expref_class_inter_Test() { OutputHelper.WriteLine(" Tests converting from a class to an interface that the class does not implement (but a derived class might)."); - Assert.True(ExprefTestClass_class_inter.testMethod()); + Assert.IsTrue(ExprefTestClass_class_inter.testMethod()); } [TestMethod] public void Expref_class_inter_exc_Test() { OutputHelper.WriteLine(" Tests converting from a class to an interface that the class does not implement (but a derived class might)."); - Assert.True(ExprefTestClass_class_inter_exc.testMethod()); + Assert.IsTrue(ExprefTestClass_class_inter_exc.testMethod()); } [TestMethod] @@ -72,21 +72,21 @@ public void Expref_inter_class_Test() OutputHelper.WriteLine(" Tests converting from an interface to a class"); OutputHelper.WriteLine("From any interface-type S to any class-type T, provided T is not sealed, or provided T implements S."); OutputHelper.WriteLine("If T implements S:"); - Assert.True(ExprefTestClass_inter_class.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_class.testMethod()); } [TestMethod] public void Expref_inter_class2_Test() { OutputHelper.WriteLine(" Tests converting from an interface to a class"); - Assert.True(ExprefTestClass_inter_class2.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_class2.testMethod()); } [TestMethod] public void Expref_inter_class2_exc1_Test() { OutputHelper.WriteLine(" Tests converting from an interface to a class"); - Assert.True(ExprefTestClass_inter_class2_exc1.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_class2_exc1.testMethod()); } [TestMethod] @@ -94,7 +94,7 @@ public void Expref_inter_class2_exc2_Test() { OutputHelper.WriteLine(" Tests converting from an interface to a class"); - Assert.True(ExprefTestClass_inter_class2_exc2.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_class2_exc2.testMethod()); } [TestMethod] @@ -102,98 +102,98 @@ public void Expref_inter_class_exc_Test() { OutputHelper.WriteLine(" Tests converting from an interface to a class"); - Assert.True(ExprefTestClass_inter_class_exc.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_class_exc.testMethod()); } [TestMethod] public void Expref_inter_class_sealed_Test() { OutputHelper.WriteLine(" Tests converting from an interface to a class"); - Assert.True(ExprefTestClass_inter_class_sealed.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_class_sealed.testMethod()); } [TestMethod] public void Expref_inter_class_sealed_exc_Test() { OutputHelper.WriteLine(" Tests converting from an interface to a class"); - Assert.True(ExprefTestClass_inter_class_sealed_exc.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_class_sealed_exc.testMethod()); } [TestMethod] public void Expref_inter_inter_Test() { OutputHelper.WriteLine(" Tests converting from an interface to an interface"); - Assert.True(ExprefTestClass_inter_inter.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_inter.testMethod()); } [TestMethod] public void Expref_inter_inter_exc_Test() { OutputHelper.WriteLine(" Tests converting from an interface to an interface"); - Assert.True(ExprefTestClass_inter_inter_exc.testMethod()); + Assert.IsTrue(ExprefTestClass_inter_inter_exc.testMethod()); } [TestMethod] public void Impenum_zero_Test() { OutputHelper.WriteLine("Tests whether 0 can be converted to various enum types..."); - Assert.True(ImpenumTestClass_zero.testMethod()); + Assert.IsTrue(ImpenumTestClass_zero.testMethod()); } [TestMethod] public void Impref_ref_obj_Test() { OutputHelper.WriteLine(" Converting from a reference object to 'object'"); - Assert.True(ImprefTestClass_ref_obj.testMethod()); + Assert.IsTrue(ImprefTestClass_ref_obj.testMethod()); } [TestMethod] public void Impref_class_class_Test() { OutputHelper.WriteLine(" Tests that you can convert from a class to a base class. "); - Assert.True(ImprefTestClass_class_class.testMethod()); + Assert.IsTrue(ImprefTestClass_class_class.testMethod()); } [TestMethod] public void Impref_class_inter_Test() { OutputHelper.WriteLine(" Tests that you can convert from a class to an interface that it implements. "); - Assert.True(ImprefTestClass_class_inter.testMethod()); + Assert.IsTrue(ImprefTestClass_class_inter.testMethod()); } [TestMethod] public void Impref_struct_inter_Test() { OutputHelper.WriteLine(" Tests that you can convert from a struct to an interface that it implements. "); - Assert.True(ImprefTestClass_struct_inter.testMethod()); + Assert.IsTrue(ImprefTestClass_struct_inter.testMethod()); } [TestMethod] public void Impref_array_array_Test() { OutputHelper.WriteLine(" Tests that you can convert from an array of one class to an array of another class..."); - Assert.True(ImprefTestClass_array_array.testMethod()); + Assert.IsTrue(ImprefTestClass_array_array.testMethod()); } [TestMethod] public void Impref_array_cloneable_Test() { OutputHelper.WriteLine(" Tests that you can convert from an array to System.ICloneable;"); - Assert.True(ImprefTestClass_array_cloneable.testMethod()); + Assert.IsTrue(ImprefTestClass_array_cloneable.testMethod()); } [TestMethod] public void Impref_null_ref_Test() { OutputHelper.WriteLine(" Tests that you can convert from null to several reference types"); - Assert.True(ImprefTestClass_null_ref.testMethod()); + Assert.IsTrue(ImprefTestClass_null_ref.testMethod()); } [TestMethod] public void Impref_delegate_to_SystemDotDelegate_Test() { OutputHelper.WriteLine(" Tests that you can convert from a delegate type to System.Delegate"); - Assert.True(ImprefTestClass_delegate_to_SystemDotDelegate.testMethod()); + Assert.IsTrue(ImprefTestClass_delegate_to_SystemDotDelegate.testMethod()); } diff --git a/Tests/NFUnitTestDelegates/NFUnitTestDelegates.nfproj b/Tests/NFUnitTestDelegates/NFUnitTestDelegates.nfproj index e23583af..ba0ab21b 100644 --- a/Tests/NFUnitTestDelegates/NFUnitTestDelegates.nfproj +++ b/Tests/NFUnitTestDelegates/NFUnitTestDelegates.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestDelegates/UnitTestDelegatesTests.cs b/Tests/NFUnitTestDelegates/UnitTestDelegatesTests.cs index 7a58393e..64eb9a11 100644 --- a/Tests/NFUnitTestDelegates/UnitTestDelegatesTests.cs +++ b/Tests/NFUnitTestDelegates/UnitTestDelegatesTests.cs @@ -17,163 +17,163 @@ public class UnitTestDelegatesTests public void Delegate_delegate01_Test() { OutputHelper.WriteLine(" Verify that both static and instance methods can be called from delegates."); - Assert.True(Delegate_TestClass_delegate01.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate01.testMethod()); } [TestMethod] public void Delegate_delegate02_Test() { OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); - Assert.True(Delegate_TestClass_delegate02.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate02.testMethod()); } [TestMethod] public void Delegate_delegate03_Test() { OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); - Assert.True(Delegate_TestClass_delegate03.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate03.testMethod()); } [TestMethod] public void Delegate_delegate04_Test() { OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator."); - Assert.True(Delegate_TestClass_delegate04.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate04.testMethod()); } [TestMethod] public void Delegate_delegate05_Test() { OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator."); - Assert.True(Delegate_TestClass_delegate05.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate05.testMethod()); } [TestMethod] public void Delegate_delegate06_Test() { OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator. Assign null instead of usable value."); - Assert.True(Delegate_TestClass_delegate06.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate06.testMethod()); } [TestMethod] public void Delegate_delegate07_Test() { OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator. Use null instead of a usable value."); - Assert.True(Delegate_TestClass_delegate07.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate07.testMethod()); } [TestMethod] public void Delegate_delegate08_Test() { OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator. Assign null instead of usable value."); - Assert.True(Delegate_TestClass_delegate08.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate08.testMethod()); } [TestMethod] public void Delegate_delegate09_Test() { OutputHelper.WriteLine(" Verify that delegates can be compared for equality."); - Assert.True(Delegate_TestClass_delegate09.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate09.testMethod()); } [TestMethod] public void Delegate_delegate10_Test() { OutputHelper.WriteLine(" Verify that delegates can be aggregated in arrays and compared for equality."); - Assert.True(Delegate_TestClass_delegate10.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate10.testMethod()); } [TestMethod] public void Delegate_delegate11_Test() { OutputHelper.WriteLine(" Verify that delegates can be members of classes."); - Assert.True(Delegate_TestClass_delegate11.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate11.testMethod()); } [TestMethod] public void Delegate_delegate12_Test() { OutputHelper.WriteLine(" Verify that both static and instance methods can be called from delegates."); - Assert.True(Delegate_TestClass_delegate12.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate12.testMethod()); } [TestMethod] public void Delegate_delegate13_Test() { OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); - Assert.True(Delegate_TestClass_delegate13.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate13.testMethod()); } [TestMethod] public void Delegate_delegate14_Test() { OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); - Assert.True(Delegate_TestClass_delegate14.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate14.testMethod()); } [TestMethod] public void Delegate_delegate14a_Test() { OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); - Assert.True(Delegate_TestClass_delegate14a.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate14a.testMethod()); } [TestMethod] public void Delegate_delegate14b_Test() { OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); - Assert.True(Delegate_TestClass_delegate14b.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate14b.testMethod()); } [TestMethod] public void Delegate_delegate14c_Test() { OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); - Assert.True(Delegate_TestClass_delegate14c.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate14c.testMethod()); } [TestMethod] public void Delegate_delegate15_Test() { OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator."); - Assert.True(Delegate_TestClass_delegate15.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate15.testMethod()); } [TestMethod] public void Delegate_delegate16_Test() { OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator."); - Assert.True(Delegate_TestClass_delegate16.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate16.testMethod()); } [TestMethod] public void Delegate_delegate17_Test() { OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator. Assign null instead of usable value."); - Assert.True(Delegate_TestClass_delegate17.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate17.testMethod()); } [TestMethod] public void Delegate_delegate18_Test() { OutputHelper.WriteLine(" Make sure a delegate list filled with nulls is detectable as foo == null"); - Assert.True(Delegate_TestClass_delegate18.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate18.testMethod()); } [TestMethod] public void Delegate_delegate19_Test() { OutputHelper.WriteLine(" Verify that delegates can be aggregated in arrays and compared for equality."); - Assert.True(Delegate_TestClass_delegate19.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate19.testMethod()); } [TestMethod] public void Delegate_delegate20_Test() { OutputHelper.WriteLine(" Verify that delegates can be compared for equality."); - Assert.True(Delegate_TestClass_delegate20.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate20.testMethod()); } [TestMethod] public void Delegate_delegate21_Test() { OutputHelper.WriteLine(" Verify that delegates can be aggregated in arrays and compared for equality."); - Assert.True(Delegate_TestClass_delegate21.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate21.testMethod()); } [TestMethod] public void Delegate_delegate23_Test() { OutputHelper.WriteLine(" Verify that delegates can be aggregated using the + operator;"); - Assert.True(Delegate_TestClass_delegate23.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate23.testMethod()); } [TestMethod] public void Delegate_delegate24_Test() { OutputHelper.WriteLine(" Verify that delegates can be aggregated using the + operator;"); - Assert.True(Delegate_TestClass_delegate24.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate24.testMethod()); } [TestMethod] public void Delegate_delegate25_Test() { OutputHelper.WriteLine(" Verify that delegates can be removed using the - operator;"); - Assert.True(Delegate_TestClass_delegate25.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate25.testMethod()); } [TestMethod] @@ -181,7 +181,7 @@ public void Delegate_delegate26_Test() { OutputHelper.WriteLine("Bug 214780 - async delegates to methods with out parameters don't work"); OutputHelper.WriteLine("This test is expected to fail."); - Assert.False(Delegate_TestClass_delegate26.testMethod()); + Assert.IsFalse(Delegate_TestClass_delegate26.testMethod()); } /* This test is skipped because it causes a Metadat processor error, it fails in the baseline. [TestMethod] @@ -189,7 +189,7 @@ public void Delegate_delegate28_Test() { OutputHelper.WriteLine("Verify Delegate with 257 args. This is because more than 257 causes the"); OutputHelper.WriteLine("compiler to take a different code path."); - Assert.True(Delegate_TestClass_delegate28.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate28.testMethod()) { return MFTestResults.Pass; } @@ -200,13 +200,13 @@ public void Delegate_delegate28_Test() public void Delegate_delegate30_Test() { OutputHelper.WriteLine(" Verify that both static and instance struct methods can be called from delegates."); - Assert.True(Delegate_TestClass_delegate30.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate30.testMethod()); } [TestMethod] public void Delegate_delegate31_Test() { OutputHelper.WriteLine(" Verify that virtual struct methods can be called from delegates."); - Assert.True(Delegate_TestClass_delegate31.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate31.testMethod()); } /*These are skipped due to their use of Volatile variables which are not supported * @@ -214,7 +214,7 @@ public void Delegate_delegate31_Test() public void Delegate_delegate32_Test() { OutputHelper.WriteLine("Delegate Invocation using BeginInvoke"); - Assert.True(Delegate_TestClass_delegate32.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate32.testMethod()) { return MFTestResults.Pass; } @@ -224,7 +224,7 @@ public void Delegate_delegate32_Test() public void Delegate_delegate34_Test() { OutputHelper.WriteLine("Delegate Invocation using BeginInvoke"); - Assert.True(Delegate_TestClass_delegate34.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate34.testMethod()) { return MFTestResults.Pass; } @@ -235,31 +235,31 @@ public void Delegate_delegate34_Test() public void Delegate_delegate36_Test() { OutputHelper.WriteLine("params modifier should not be considered when matching a delegate with a method"); - Assert.True(Delegate_TestClass_delegate36.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate36.testMethod()); } [TestMethod] public void Delegate_delegate60_Test() { OutputHelper.WriteLine("A delegate declaration defines a class that derives from System.Delegate"); - Assert.True(Delegate_TestClass_delegate60.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate60.testMethod()); } [TestMethod] public void Delegate_delegate62_Test() { OutputHelper.WriteLine("The compiler is expected to warn that the new keyword id not rquired as we're not hiding an inherited member"); - Assert.True(Delegate_TestClass_delegate62.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate62.testMethod()); } [TestMethod] public void Delegate_delegate64_Test() { OutputHelper.WriteLine("Compiler is expected to warn when new is not used when hiding a member delegate of the base class"); - Assert.True(Delegate_TestClass_delegate64.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate64.testMethod()); } [TestMethod] public void Delegate_delegate65_Test() { OutputHelper.WriteLine("Make sure delegates can be hidden."); - Assert.True(Delegate_TestClass_delegate65.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate65.testMethod()); } /*These tests are skipped because the use the == operator in an unsupported way * @@ -267,7 +267,7 @@ public void Delegate_delegate65_Test() public void Delegate_delegate66_Test() { OutputHelper.WriteLine("Two compatible delegate types can be compared for equality."); - Assert.True(Delegate_TestClass_delegate66.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate66.testMethod()) { return MFTestResults.Pass; } @@ -277,7 +277,7 @@ public void Delegate_delegate66_Test() public void Delegate_delegate70_Test() { OutputHelper.WriteLine("Two compatible delegate types can be compared for equality (or inequality)."); - Assert.True(Delegate_TestClass_delegate70.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate70.testMethod()) { return MFTestResults.Pass; } @@ -288,13 +288,13 @@ public void Delegate_delegate70_Test() public void Delegate_delegate71_Test() { OutputHelper.WriteLine("Verify simple +="); - Assert.True(Delegate_TestClass_delegate71.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate71.testMethod()); } [TestMethod] public void Delegate_delegate72_Test() { OutputHelper.WriteLine(" Verify that delegates can be removed using the -= operator;"); - Assert.True(Delegate_TestClass_delegate72.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate72.testMethod()); } /* These tests are skipped because they use == in an unsupported way * @@ -302,7 +302,7 @@ public void Delegate_delegate72_Test() public void Delegate_delegate73_Test() { OutputHelper.WriteLine("Verify equality and inequality after using += and -= on delegates"); - Assert.True(Delegate_TestClass_delegate73.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate73.testMethod()) { return MFTestResults.Pass; } @@ -312,7 +312,7 @@ public void Delegate_delegate73_Test() public void Delegate_delegate74_Test() { OutputHelper.WriteLine("Verify ability to call members of System.Delegate on delegate types"); - Assert.True(Delegate_TestClass_delegate74.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate74.testMethod()) { return MFTestResults.Pass; } @@ -323,7 +323,7 @@ public void Delegate_delegate75_Test() { OutputHelper.WriteLine("Verify ability to call members of System.Delegate on delegate types"); OutputHelper.WriteLine("and that ordinality is maintained in concatenated invocation lists"); - Assert.True(Delegate_TestClass_delegate75.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate75.testMethod()) { return MFTestResults.Pass; } @@ -334,7 +334,7 @@ public void Delegate_delegate76_Test() { OutputHelper.WriteLine("Verify ability to call members of System.Delegate on delegate types"); OutputHelper.WriteLine("and that ordinality is maintained in concatenated invocation lists"); - Assert.True(Delegate_TestClass_delegate76.testMethod()) + Assert.IsTrue(Delegate_TestClass_delegate76.testMethod()) { return MFTestResults.Pass; } @@ -346,7 +346,7 @@ public void Delegate_delegate77_Test() { OutputHelper.WriteLine("Verify that ordinality is maintained in concatenated invocation lists"); OutputHelper.WriteLine("and that the invocation list members are called synchronously"); - Assert.True(Delegate_TestClass_delegate77.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate77.testMethod()); } [TestMethod] public void Delegate_delegate78_Test() @@ -354,7 +354,7 @@ public void Delegate_delegate78_Test() OutputHelper.WriteLine("Verify that ordinality is maintained in concatenated invocation lists"); OutputHelper.WriteLine("and that the invocation list members are called synchronously and"); OutputHelper.WriteLine("that ref parameters are modified through the invocation chain."); - Assert.True(Delegate_TestClass_delegate78.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate78.testMethod()); } [TestMethod] public void Delegate_delegate79_Test() @@ -362,44 +362,44 @@ public void Delegate_delegate79_Test() OutputHelper.WriteLine("Verify that ordinality is maintained in concatenated invocation lists"); OutputHelper.WriteLine("and that the invocation list members are called synchronously and"); OutputHelper.WriteLine("that out parameters are set by the last member in the invocation chain."); - Assert.True(Delegate_TestClass_delegate79.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate79.testMethod()); } [TestMethod] public void Delegate_delegate80_Test() { OutputHelper.WriteLine("Verify that System.Exceptions not caught in invoked method are bubbled up"); OutputHelper.WriteLine("and the remaining methods in the invocation list are not invoked."); - Assert.True(Delegate_TestClass_delegate80.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate80.testMethod()); } [TestMethod] public void Delegate_delegate81_Test() { OutputHelper.WriteLine("Sample from section 15.3 of Delegate_TestClass_?_A#LS"); - Assert.True(Delegate_TestClass_delegate81.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate81.testMethod()); } [TestMethod] public void Delegate_delegate_modifier09_Test() { OutputHelper.WriteLine("only new, public, private, protected and internal are allowed as modifiers"); - Assert.True(Delegate_TestClass_delegate_modifier09.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate_modifier09.testMethod()); } [TestMethod] public void Delegate_delegate_modifier10_Test() { OutputHelper.WriteLine("only new, public, private, protected and internal are allowed as modifiers"); - Assert.True(Delegate_TestClass_delegate_modifier10.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate_modifier10.testMethod()); } [TestMethod] public void Delegate_delegate_modifier11_Test() { OutputHelper.WriteLine("only new, public, private, protected and internal are allowed as modifiers"); - Assert.True(Delegate_TestClass_delegate_modifier11.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate_modifier11.testMethod()); } [TestMethod] public void Delegate_delegate_modifier12_Test() { OutputHelper.WriteLine("only new, public, private, protected and internal are allowed as modifiers"); - Assert.True(Delegate_TestClass_delegate_modifier12.testMethod()); + Assert.IsTrue(Delegate_TestClass_delegate_modifier12.testMethod()); } diff --git a/Tests/NFUnitTestEnum/NFUnitTestEnum.nfproj b/Tests/NFUnitTestEnum/NFUnitTestEnum.nfproj index f50a1e58..f78c77fd 100644 --- a/Tests/NFUnitTestEnum/NFUnitTestEnum.nfproj +++ b/Tests/NFUnitTestEnum/NFUnitTestEnum.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestEnum/UnitTestEnumTests.cs b/Tests/NFUnitTestEnum/UnitTestEnumTests.cs index 785fc199..185872ba 100644 --- a/Tests/NFUnitTestEnum/UnitTestEnumTests.cs +++ b/Tests/NFUnitTestEnum/UnitTestEnumTests.cs @@ -17,355 +17,355 @@ public class UnitTestEnumTests public void Enum_enum01_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum01.testMethod()); + Assert.IsTrue(Enum_TestClass_enum01.testMethod()); } [TestMethod] public void Enum_enum02_Test() { OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); - Assert.True(Enum_TestClass_enum02.testMethod()); + Assert.IsTrue(Enum_TestClass_enum02.testMethod()); } [TestMethod] public void Enum_enum07_Test() { OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); - Assert.True(Enum_TestClass_enum07.testMethod()); + Assert.IsTrue(Enum_TestClass_enum07.testMethod()); } [TestMethod] public void Enum_enum09_Test() { OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); - Assert.True(Enum_TestClass_enum09.testMethod()); + Assert.IsTrue(Enum_TestClass_enum09.testMethod()); } [TestMethod] public void Enum_enum10_Test() { OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); - Assert.True(Enum_TestClass_enum10.testMethod()); + Assert.IsTrue(Enum_TestClass_enum10.testMethod()); } [TestMethod] public void Enum_enum11_Test() { OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); - Assert.True(Enum_TestClass_enum11.testMethod()); + Assert.IsTrue(Enum_TestClass_enum11.testMethod()); } [TestMethod] public void Enum_enum27_Test() { OutputHelper.WriteLine("Check that enumerator values are initialized as expected"); - Assert.True(Enum_TestClass_enum27.testMethod()); + Assert.IsTrue(Enum_TestClass_enum27.testMethod()); } [TestMethod] public void Enum_enum28_Test() { OutputHelper.WriteLine("Check that enumerator values are initialized as expected"); - Assert.True(Enum_TestClass_enum28.testMethod()); + Assert.IsTrue(Enum_TestClass_enum28.testMethod()); } [TestMethod] public void Enum_enum29_Test() { OutputHelper.WriteLine("The values of the enumerators need not be distinct"); - Assert.True(Enum_TestClass_enum29.testMethod()); + Assert.IsTrue(Enum_TestClass_enum29.testMethod()); } [TestMethod] public void Enum_enum30_Test() { OutputHelper.WriteLine("Check the point of definition of an enumerator"); - Assert.True(Enum_TestClass_enum30.testMethod()); + Assert.IsTrue(Enum_TestClass_enum30.testMethod()); } [TestMethod] public void Enum_enum31_Test() { OutputHelper.WriteLine("Check the point of definition of an enumerator"); - Assert.True(Enum_TestClass_enum31.testMethod()); + Assert.IsTrue(Enum_TestClass_enum31.testMethod()); } [TestMethod] public void Enum_enum33_Test() { OutputHelper.WriteLine("Enums obey local scope rules. An enum of the same name may be defined in an inner scope."); - Assert.True(Enum_TestClass_enum33.testMethod()); + Assert.IsTrue(Enum_TestClass_enum33.testMethod()); } [TestMethod] public void Enum_enum34_Test() { OutputHelper.WriteLine("Enums can be converted to int."); - Assert.True(Enum_TestClass_enum34.testMethod()); + Assert.IsTrue(Enum_TestClass_enum34.testMethod()); } [TestMethod] public void Enum_enum35_Test() { OutputHelper.WriteLine("If no enumerator-definitions with = appear, then the"); OutputHelper.WriteLine(" values of the corresponding constants begin at zero and"); - Assert.True(Enum_TestClass_enum35.testMethod()); + Assert.IsTrue(Enum_TestClass_enum35.testMethod()); } [TestMethod] public void Enum_enum36_Test() { OutputHelper.WriteLine("If no enumerator-definitions with = appear, then the"); OutputHelper.WriteLine(" values of the corresponding constants begin at zero and"); - Assert.True(Enum_TestClass_enum36.testMethod()); + Assert.IsTrue(Enum_TestClass_enum36.testMethod()); } [TestMethod] public void Enum_enum37_Test() { OutputHelper.WriteLine("If no enumerator-definitions with = appear, then the"); OutputHelper.WriteLine(" values of the corresponding constants begin at zero and"); - Assert.True(Enum_TestClass_enum37.testMethod()); + Assert.IsTrue(Enum_TestClass_enum37.testMethod()); } [TestMethod] public void Enum_enum38_Test() { OutputHelper.WriteLine("Enums can be declared in any scopt that a class can be declared in."); - Assert.True(Enum_TestClass_enum38.testMethod()); + Assert.IsTrue(Enum_TestClass_enum38.testMethod()); } [TestMethod] public void Enum_enum39_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum39.testMethod()); + Assert.IsTrue(Enum_TestClass_enum39.testMethod()); } [TestMethod] public void Enum_enum40_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum40.testMethod()); + Assert.IsTrue(Enum_TestClass_enum40.testMethod()); } [TestMethod] public void Enum_enum41_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum41.testMethod()); + Assert.IsTrue(Enum_TestClass_enum41.testMethod()); } [TestMethod] public void Enum_enum42_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum42.testMethod()); + Assert.IsTrue(Enum_TestClass_enum42.testMethod()); } [TestMethod] public void Enum_enum43_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum43.testMethod()); + Assert.IsTrue(Enum_TestClass_enum43.testMethod()); } [TestMethod] public void Enum_enum43u_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum43u.testMethod()); + Assert.IsTrue(Enum_TestClass_enum43u.testMethod()); } [TestMethod] public void Enum_enum44_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum44.testMethod()); + Assert.IsTrue(Enum_TestClass_enum44.testMethod()); } [TestMethod] public void Enum_enum45_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum45.testMethod()); + Assert.IsTrue(Enum_TestClass_enum45.testMethod()); } [TestMethod] public void Enum_enum46_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum46.testMethod()); + Assert.IsTrue(Enum_TestClass_enum46.testMethod()); } [TestMethod] public void Enum_enum46u_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum46u.testMethod()); + Assert.IsTrue(Enum_TestClass_enum46u.testMethod()); } [TestMethod] public void Enum_enum47_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum47.testMethod()); + Assert.IsTrue(Enum_TestClass_enum47.testMethod()); } [TestMethod] public void Enum_enum47u_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum47u.testMethod()); + Assert.IsTrue(Enum_TestClass_enum47u.testMethod()); } [TestMethod] public void Enum_enum48_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum48.testMethod()); + Assert.IsTrue(Enum_TestClass_enum48.testMethod()); } [TestMethod] public void Enum_enum48u_Test() { OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); - Assert.True(Enum_TestClass_enum48u.testMethod()); + Assert.IsTrue(Enum_TestClass_enum48u.testMethod()); } [TestMethod] public void Enum_enum54_Test() { OutputHelper.WriteLine("++ and -- operators can be used with objects of enumeration type. Check postfix form."); - Assert.True(Enum_TestClass_enum54.testMethod()); + Assert.IsTrue(Enum_TestClass_enum54.testMethod()); } [TestMethod] public void Enum_enum55_Test() { OutputHelper.WriteLine("++ and -- operators can be used with objects of enumeration type. Check postfix form."); - Assert.True(Enum_TestClass_enum55.testMethod()); + Assert.IsTrue(Enum_TestClass_enum55.testMethod()); } [TestMethod] public void Enum_enum56_Test() { OutputHelper.WriteLine("++ and -- operators can be used with objects of enumeration type. Check postfix form."); - Assert.True(Enum_TestClass_enum56.testMethod()); + Assert.IsTrue(Enum_TestClass_enum56.testMethod()); } [TestMethod] public void Enum_enum57_Test() { OutputHelper.WriteLine("++ and -- operators can be used with objects of enumeration type. Check postfix form."); - Assert.True(Enum_TestClass_enum57.testMethod()); + Assert.IsTrue(Enum_TestClass_enum57.testMethod()); } [TestMethod] public void Enum_enum58_Test() { OutputHelper.WriteLine("Bitwise operators AND, OR, XOR, and NOT can be used with objects of enumeration type."); - Assert.True(Enum_TestClass_enum58.testMethod()); + Assert.IsTrue(Enum_TestClass_enum58.testMethod()); } [TestMethod] public void Enum_enum62_Test() { - Assert.True(Enum_TestClass_enum62.testMethod()); + Assert.IsTrue(Enum_TestClass_enum62.testMethod()); } [TestMethod] public void Enum_enum63_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum63.testMethod()); + Assert.IsTrue(Enum_TestClass_enum63.testMethod()); } [TestMethod] public void Enum_enum64_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum64.testMethod()); + Assert.IsTrue(Enum_TestClass_enum64.testMethod()); } [TestMethod] public void Enum_enum65_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum65.testMethod()); + Assert.IsTrue(Enum_TestClass_enum65.testMethod()); } [TestMethod] public void Enum_enum66_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum66.testMethod()); + Assert.IsTrue(Enum_TestClass_enum66.testMethod()); } [TestMethod] public void Enum_enum67_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum67.testMethod()); + Assert.IsTrue(Enum_TestClass_enum67.testMethod()); } [TestMethod] public void Enum_enum68_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum68.testMethod()); + Assert.IsTrue(Enum_TestClass_enum68.testMethod()); } [TestMethod] public void Enum_enum69_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum69.testMethod()); + Assert.IsTrue(Enum_TestClass_enum69.testMethod()); } [TestMethod] public void Enum_enum70_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - Assert.True(Enum_TestClass_enum70.testMethod()); + Assert.IsTrue(Enum_TestClass_enum70.testMethod()); } [TestMethod] public void Enum_enum71_Test() { OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); OutputHelper.WriteLine("This test is expeced to fail"); - Assert.False(Enum_TestClass_enum71.testMethod()); + Assert.IsFalse(Enum_TestClass_enum71.testMethod()); } [TestMethod] public void Enum_enum72_Test() { OutputHelper.WriteLine("Enum_TestClass_? bitwise and on enums"); - Assert.True(Enum_TestClass_enum72.testMethod()); + Assert.IsTrue(Enum_TestClass_enum72.testMethod()); } [TestMethod] public void Enum_enum73_Test() { OutputHelper.WriteLine("Enum_TestClass_? bitwise or on enums"); - Assert.True(Enum_TestClass_enum73.testMethod()); + Assert.IsTrue(Enum_TestClass_enum73.testMethod()); } [TestMethod] public void Enum_enum74_Test() { OutputHelper.WriteLine("Enum_TestClass_? bitwise xor on enums"); - Assert.True(Enum_TestClass_enum74.testMethod()); + Assert.IsTrue(Enum_TestClass_enum74.testMethod()); } [TestMethod] public void Enum_enum75_Test() { OutputHelper.WriteLine("Enum_TestClass_? bitwise not on enums"); - Assert.True(Enum_TestClass_enum75.testMethod()); + Assert.IsTrue(Enum_TestClass_enum75.testMethod()); } [TestMethod] public void Enum_enum77_Test() { OutputHelper.WriteLine("Enum_TestClass_? bitwise not on enums"); - Assert.True(Enum_TestClass_enum77.testMethod()); + Assert.IsTrue(Enum_TestClass_enum77.testMethod()); } [TestMethod] public void Enum_enum78_Test() { - Assert.True(Enum_TestClass_enum78.testMethod()); + Assert.IsTrue(Enum_TestClass_enum78.testMethod()); } [TestMethod] public void Enum_enum83_Test() { OutputHelper.WriteLine("Enum member list can end with a comma"); - Assert.True(Enum_TestClass_enum83.testMethod()); + Assert.IsTrue(Enum_TestClass_enum83.testMethod()); } [TestMethod] public void Enum_enum86_Test() { OutputHelper.WriteLine("[Access] modifiers of an enum declaration have the same meaning"); OutputHelper.WriteLine("as those of a class declaration."); - Assert.True(Enum_TestClass_enum86.testMethod()); + Assert.IsTrue(Enum_TestClass_enum86.testMethod()); } [TestMethod] public void Enum_enum93_Test() { OutputHelper.WriteLine("Example from Enums chapter in CLS"); - Assert.True(Enum_TestClass_enum93.testMethod()); + Assert.IsTrue(Enum_TestClass_enum93.testMethod()); } [TestMethod] public void Enum_enum94_Test() { OutputHelper.WriteLine("...any value of the underlying type of an enum can be cast to the enum type."); - Assert.True(Enum_TestClass_enum94.testMethod()); + Assert.IsTrue(Enum_TestClass_enum94.testMethod()); } [TestMethod] public void EnumFlags01_Test() @@ -425,17 +425,17 @@ public static void TestMethod() var e1_one_clone = e1_one; var e1_two_clone = e1_two; - Assert.True(e1_one.Equals(e1.one), "e1_one should be equal to e1.one"); - Assert.True(e1_two.Equals(e1.two), "e1_two should be equal to e1.two"); + Assert.IsTrue(e1_one.Equals(e1.one), "e1_one should be equal to e1.one"); + Assert.IsTrue(e1_two.Equals(e1.two), "e1_two should be equal to e1.two"); - Assert.True(e1_one_clone.Equals(e1_one), "e1_one_clone should be equal to e1_one"); - Assert.True(e1_two_clone.Equals(e1_two), "e1_two_clone should be equal to e1_two"); + Assert.IsTrue(e1_one_clone.Equals(e1_one), "e1_one_clone should be equal to e1_one"); + Assert.IsTrue(e1_two_clone.Equals(e1_two), "e1_two_clone should be equal to e1_two"); - Assert.False(e1_three.Equals(e1.two), "e1_three should NOT be equal to e1.two"); - Assert.False(e1_two.Equals(e1.one), "e1_two should NOT be equal to e1.one"); + Assert.IsFalse(e1_three.Equals(e1.two), "e1_three should NOT be equal to e1.two"); + Assert.IsFalse(e1_two.Equals(e1.one), "e1_two should NOT be equal to e1.one"); - Assert.False(e1_one_clone.Equals(e1_two), "e1_one_clone should NOT be equal to e1_two"); - Assert.False(e1_two_clone.Equals(e1_one), "e1_two_clone should NOT be equal to e1_one"); + Assert.IsFalse(e1_one_clone.Equals(e1_two), "e1_one_clone should NOT be equal to e1_two"); + Assert.IsFalse(e1_two_clone.Equals(e1_one), "e1_two_clone should NOT be equal to e1_one"); } }; @@ -2641,7 +2641,7 @@ public static void TestMethod() r = r | TestClassEnumFlags.Second | TestClassEnumFlags.Third; OutputHelper.WriteLine(r.ToString()); - Assert.Equal((int)r, 0x000f); + Assert.AreEqual((int)r, 0x000f); } } @@ -2652,7 +2652,7 @@ public static void TestMethod() TestClassEnumFlags r = TestClassEnumFlags.First | TestClassEnumFlags.Fourth; r += 0x00f; // out of range OutputHelper.WriteLine(r.ToString()); - Assert.Equal((int)r, 24); + Assert.AreEqual((int)r, 24); } } @@ -2663,7 +2663,7 @@ public static void TestMethod() int i = 0x0f; TestClassEnumFlags r = (TestClassEnumFlags)i; OutputHelper.WriteLine(r.ToString()); - Assert.Equal((int)r, 0x000f); + Assert.AreEqual((int)r, 0x000f); } } @@ -2672,12 +2672,12 @@ public class TestClassEnumFlags05 public static void TestMethod() { TestClassEnumFlags e1 = TestClassEnumFlags.First; - Assert.False(e1.HasFlag(TestClassEnumFlags.Second)); - Assert.True(e1.HasFlag(TestClassEnumFlags.First)); + Assert.IsFalse(e1.HasFlag(TestClassEnumFlags.Second)); + Assert.IsTrue(e1.HasFlag(TestClassEnumFlags.First)); TestClassEnumFlags e2 = TestClassEnumFlags.Third; - Assert.False(e2.HasFlag(TestClassEnumFlags.Fourth)); - Assert.True(e2.HasFlag(TestClassEnumFlags.Third)); + Assert.IsFalse(e2.HasFlag(TestClassEnumFlags.Fourth)); + Assert.IsTrue(e2.HasFlag(TestClassEnumFlags.Third)); } } @@ -2693,7 +2693,7 @@ public static void TestMethod() try { e1.HasFlag(e2); - Assert.False(true, "No exception thrown!"); + Assert.IsFalse(true, "No exception thrown!"); } catch (ArgumentException) { diff --git a/Tests/NFUnitTestException/NFUnitTestException.nfproj b/Tests/NFUnitTestException/NFUnitTestException.nfproj index 7a99f09b..be674ff4 100644 --- a/Tests/NFUnitTestException/NFUnitTestException.nfproj +++ b/Tests/NFUnitTestException/NFUnitTestException.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestException/UnitTestExceptionTests.cs b/Tests/NFUnitTestException/UnitTestExceptionTests.cs index 87860f66..2d092c0e 100644 --- a/Tests/NFUnitTestException/UnitTestExceptionTests.cs +++ b/Tests/NFUnitTestException/UnitTestExceptionTests.cs @@ -16,7 +16,7 @@ public class UnitTestExceptionTests [TestMethod] public void TestTimeoutException() { - Assert.Throws(typeof(TimeoutException), () => + Assert.ThrowsException(typeof(TimeoutException), () => { throw new TimeoutException(); }); @@ -26,92 +26,92 @@ public void TestTimeoutException() public void Exc_excep01_Test() { OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the matching catch"); - Assert.True(Exc_TestClass_excep01.testMethod()); + Assert.IsTrue(Exc_TestClass_excep01.testMethod()); } [TestMethod] public void Exc_excep02_Test() { OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the matching catch, not the base class catch blocks"); - Assert.True(Exc_TestClass_excep02.testMethod()); + Assert.IsTrue(Exc_TestClass_excep02.testMethod()); } [TestMethod] public void Exc_excep04_Test() { OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught and the error code can be set"); - Assert.True(Exc_TestClass_excep04.testMethod()); + Assert.IsTrue(Exc_TestClass_excep04.testMethod()); } [TestMethod] public void Exc_excep05_Test() { OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the matching catch, not the base class catch"); - Assert.True(Exc_TestClass_excep05.testMethod()); + Assert.IsTrue(Exc_TestClass_excep05.testMethod()); } [TestMethod] public void Exc_excep06_Test() { OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the base class catch"); - Assert.True(Exc_TestClass_excep06.testMethod()); + Assert.IsTrue(Exc_TestClass_excep06.testMethod()); } [TestMethod] public void Exc_excep07_Test() { OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the base class catch()"); - Assert.True(Exc_TestClass_excep07.testMethod()); + Assert.IsTrue(Exc_TestClass_excep07.testMethod()); } [TestMethod] public void Exc_excep09_Test() { OutputHelper.WriteLine("This test will confirm that the catch() functions."); - Assert.True(Exc_TestClass_excep09.testMethod()); + Assert.IsTrue(Exc_TestClass_excep09.testMethod()); } [TestMethod] public void Exc_excep10_Test() { OutputHelper.WriteLine("This test will confirm that the thrown exception is handled in the catch()"); OutputHelper.WriteLine("when no matching catch is available."); - Assert.True(Exc_TestClass_excep10.testMethod()); + Assert.IsTrue(Exc_TestClass_excep10.testMethod()); } [TestMethod] public void Exc_excep11_Test() { OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the matching catch, not the catch()"); - Assert.True(Exc_TestClass_excep11.testMethod()); + Assert.IsTrue(Exc_TestClass_excep11.testMethod()); } [TestMethod] public void Exc_excep27_Test() { OutputHelper.WriteLine("Throwing an exception transfers control to a handler."); - Assert.True(Exc_TestClass_excep27.testMethod()); + Assert.IsTrue(Exc_TestClass_excep27.testMethod()); } [TestMethod] public void Exc_excep28_Test() { OutputHelper.WriteLine("When an exception is thrown, control is transferred to a handler"); - Assert.True(Exc_TestClass_excep28.testMethod()); + Assert.IsTrue(Exc_TestClass_excep28.testMethod()); } [TestMethod] public void Exc_excep30_Test() { OutputHelper.WriteLine("A throw-expression with no operand rethrows the exception being handled."); - Assert.True(Exc_TestClass_excep30.testMethod()); + Assert.IsTrue(Exc_TestClass_excep30.testMethod()); } [TestMethod] public void Exc_excep31_Test() { OutputHelper.WriteLine("A throw-expression with no operand does not copy the exception being handled."); - Assert.True(Exc_TestClass_excep31.testMethod()); + Assert.IsTrue(Exc_TestClass_excep31.testMethod()); } [TestMethod] public void Exc_excep33_Test() { OutputHelper.WriteLine("The exception thrown by a rethrow is the one most recently caught and not finished."); - Assert.True(Exc_TestClass_excep33.testMethod()); + Assert.IsTrue(Exc_TestClass_excep33.testMethod()); } [TestMethod] public void Exc_excep34_Test() { OutputHelper.WriteLine("When initialization is complete for the formal parameter of a catch clause, an exception is considered caught."); - Assert.True(Exc_TestClass_excep34.testMethod()); + Assert.IsTrue(Exc_TestClass_excep34.testMethod()); } [TestMethod] public void Exc_excep35_Test() @@ -119,7 +119,7 @@ public void Exc_excep35_Test() OutputHelper.WriteLine("A handler is not allowed to catch an expression thrown outside"); OutputHelper.WriteLine("its function-try-block and any function called from its function-"); OutputHelper.WriteLine("try-block."); - Assert.True(Exc_TestClass_excep35.testMethod()); + Assert.IsTrue(Exc_TestClass_excep35.testMethod()); } [TestMethod] public void Exc_excep40_Test() @@ -127,7 +127,7 @@ public void Exc_excep40_Test() OutputHelper.WriteLine("If no match is found among the handlers for a try-block, the"); OutputHelper.WriteLine("search for a matching handler continues in a dynamically"); OutputHelper.WriteLine("surrounding try-block."); - Assert.True(Exc_TestClass_excep40.testMethod()); + Assert.IsTrue(Exc_TestClass_excep40.testMethod()); } [TestMethod] public void Exc_excep41_Test() @@ -135,7 +135,7 @@ public void Exc_excep41_Test() OutputHelper.WriteLine("If no match is found among the handlers for a try-block, the"); OutputHelper.WriteLine("search for a matching handler continues in a dynamically"); OutputHelper.WriteLine("surrounding try-block."); - Assert.True(Exc_TestClass_excep41.testMethod()); + Assert.IsTrue(Exc_TestClass_excep41.testMethod()); } // TODO: check this @@ -146,7 +146,7 @@ public void Exc_excep41_Test() public void Exc_excep42_Test() { OutputHelper.WriteLine("Handle throws up to 255 levels deep."); - Assert.True(Exc_TestClass_excep42.testMethod()) + Assert.IsTrue(Exc_TestClass_excep42.testMethod()) { return MFTestResults.Pass; } @@ -157,7 +157,7 @@ public void Exc_excep42_Test() public void Exc_excep42b_Test() { OutputHelper.WriteLine("Handle throws up to 33 levels deep."); - Assert.True(Exc_TestClass_excep42b.testMethod()); + Assert.IsTrue(Exc_TestClass_excep42b.testMethod()); } // TODO: Check this @@ -168,7 +168,7 @@ public void Exc_excep42b_Test() public void Exc_excep43_Test() { OutputHelper.WriteLine("Handle throws up to 255 levels deep, but don't catch. VM should not die."); - Assert.True(Exc_TestClass_excep43.testMethod()) + Assert.IsTrue(Exc_TestClass_excep43.testMethod()) { return MFTestResults.Pass; } @@ -179,43 +179,43 @@ public void Exc_excep43_Test() public void Exc_excep56_Test() { OutputHelper.WriteLine("Should get unreachable code warning, but nothing more."); - Assert.True(Exc_TestClass_excep56.testMethod()); + Assert.IsTrue(Exc_TestClass_excep56.testMethod()); } [TestMethod] public void Exc_excep57_Test() { OutputHelper.WriteLine("Should get unreachable code warning, but nothing more."); - Assert.True(Exc_TestClass_excep57.testMethod()); + Assert.IsTrue(Exc_TestClass_excep57.testMethod()); } [TestMethod] public void Exc_excep58_Test() { OutputHelper.WriteLine("Any finally clauses associated with try statements will be executed before catch clause execution"); - Assert.True(Exc_TestClass_excep58.testMethod()); + Assert.IsTrue(Exc_TestClass_excep58.testMethod()); } [TestMethod] public void Exc_excep59_Test() { OutputHelper.WriteLine("Any finally clauses associated with try statements will be executed before catch clause execution"); - Assert.True(Exc_TestClass_excep59.testMethod()); + Assert.IsTrue(Exc_TestClass_excep59.testMethod()); } [TestMethod] public void Exc_excep60_Test() { OutputHelper.WriteLine("Inner exceptions can be chained"); - Assert.True(Exc_TestClass_excep60.testMethod()); + Assert.IsTrue(Exc_TestClass_excep60.testMethod()); } [TestMethod] public void Exc_excep61_Test() { OutputHelper.WriteLine("Inner exceptions can be chained to arbitrary length"); - Assert.True(Exc_TestClass_excep61.testMethod()); + Assert.IsTrue(Exc_TestClass_excep61.testMethod()); } [TestMethod] public void Exc_excep62_Test() { OutputHelper.WriteLine("Any finally clauses associated with try statements will be executed before catch clause execution"); - Assert.True(Exc_TestClass_excep62.testMethod()); + Assert.IsTrue(Exc_TestClass_excep62.testMethod()); } //[TestMethod] //public void Exc_excep63_Test() @@ -227,7 +227,7 @@ public void Exc_excep62_Test() // OutputHelper.WriteLine("Disable this test so that it doesn't hose VS until it is fixed."); // // TODO: check this - // Assert.True(Exc_TestClass_excep63.testMethod()); + // Assert.IsTrue(Exc_TestClass_excep63.testMethod()); // { // OutputHelper.WriteLine("This is bug number: 21724 Resolved By Design."); // OutputHelper.WriteLine("This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. "); @@ -244,7 +244,7 @@ public void Exc_excep62_Test() // OutputHelper.WriteLine("Disable this test so that it doesn't hose VS until it is fixed."); // // TODO: check this - // Assert.True(Exc_TestClass_excep64.testMethod()); + // Assert.IsTrue(Exc_TestClass_excep64.testMethod()); // { // OutputHelper.WriteLine("This is bug number: 21724 Resolved By Design."); // OutputHelper.WriteLine("This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. "); @@ -263,7 +263,7 @@ public void Exc_excep65_Test() OutputHelper.WriteLine("If a catch search reaches a static ctor then a Exception is thrown,"); OutputHelper.WriteLine("at the point of static ctor invocation. The inner exception is the original exception."); - Assert.True(Exc_TestClass_excep65.testMethod()) + Assert.IsTrue(Exc_TestClass_excep65.testMethod()) { return MFTestResults.Pass; } diff --git a/Tests/NFUnitTestInterface/NFUnitTestInterface.nfproj b/Tests/NFUnitTestInterface/NFUnitTestInterface.nfproj index cd8929d3..c9257439 100644 --- a/Tests/NFUnitTestInterface/NFUnitTestInterface.nfproj +++ b/Tests/NFUnitTestInterface/NFUnitTestInterface.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestInterface/UnitTestInterfaceTests.cs b/Tests/NFUnitTestInterface/UnitTestInterfaceTests.cs index b78d3369..4ffb3268 100644 --- a/Tests/NFUnitTestInterface/UnitTestInterfaceTests.cs +++ b/Tests/NFUnitTestInterface/UnitTestInterfaceTests.cs @@ -20,14 +20,14 @@ public void Interface_base_06_Test() OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("If effective visibility is internal, public iface may have an internal base iface "); OutputHelper.WriteLine("(Bug 86453: has some details on this. But it has to do with class internal)"); - Assert.True(Interface_TestClass_base_06.testMethod()); + Assert.IsTrue(Interface_TestClass_base_06.testMethod()); } [TestMethod] public void Interface_decl_01_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest interface declared in global namespace"); - Assert.True(Interface_TestClass_decl_01.testMethod()); + Assert.IsTrue(Interface_TestClass_decl_01.testMethod()); } [TestMethod] @@ -35,7 +35,7 @@ public void Interface_decl_03_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest interface declared in class in default global namespace"); - Assert.True(Interface_TestClass_decl_03.testMethod()); + Assert.IsTrue(Interface_TestClass_decl_03.testMethod()); } [TestMethod] @@ -43,7 +43,7 @@ public void Interface_decl_05_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simple interface declaration with diff types of methods, args, and properties"); - Assert.True(Interface_TestClass_decl_05.testMethod()); + Assert.IsTrue(Interface_TestClass_decl_05.testMethod()); } [TestMethod] @@ -51,7 +51,7 @@ public void Interface_decl_06_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simple interface declaration properties with only gets"); - Assert.True(Interface_TestClass_decl_06.testMethod()); + Assert.IsTrue(Interface_TestClass_decl_06.testMethod()); } [TestMethod] @@ -59,7 +59,7 @@ public void Interface_decl_07_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simple interface declaration properties with only sets"); - Assert.True(Interface_TestClass_decl_07.testMethod()); + Assert.IsTrue(Interface_TestClass_decl_07.testMethod()); } [TestMethod] @@ -67,7 +67,7 @@ public void Interface_inherit_01_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify that an interface can be hidden by 'new' member in derived class"); - Assert.True(Interface_TestClass_inherit_01.testMethod()); + Assert.IsTrue(Interface_TestClass_inherit_01.testMethod()); } [TestMethod] @@ -75,7 +75,7 @@ public void Interface_inherit_02_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest form of interface inheritance"); - Assert.True(Interface_TestClass_inherit_02.testMethod()); + Assert.IsTrue(Interface_TestClass_inherit_02.testMethod()); } [TestMethod] @@ -83,7 +83,7 @@ public void Interface_inherit_03_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest form of interface inheritance, inheriting multiple interfaces"); - Assert.True(Interface_TestClass_inherit_03.testMethod()); + Assert.IsTrue(Interface_TestClass_inherit_03.testMethod()); } [TestMethod] @@ -91,7 +91,7 @@ public void Interface_inherit_04_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest form of interface inheritance, inheriting multiple interfaces"); - Assert.True(Interface_TestClass_inherit_04.testMethod()); + Assert.IsTrue(Interface_TestClass_inherit_04.testMethod()); } [TestMethod] @@ -99,7 +99,7 @@ public void Interface_inherit_08_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify that an interface hidden without using new results in warning"); - Assert.True(Interface_TestClass_inherit_08.testMethod()); + Assert.IsTrue(Interface_TestClass_inherit_08.testMethod()); } [TestMethod] @@ -107,7 +107,7 @@ public void Interface_modifier_01_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify public and internal interfaces declared in global namespace are valid"); - Assert.True(Interface_TestClass_modifier_01.testMethod()); + Assert.IsTrue(Interface_TestClass_modifier_01.testMethod()); } [TestMethod] @@ -115,7 +115,7 @@ public void Interface_modifier_05_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify public and internal interfaces are valid inside classes"); - Assert.True(Interface_TestClass_modifier_05.testMethod()); + Assert.IsTrue(Interface_TestClass_modifier_05.testMethod()); } [TestMethod] @@ -123,7 +123,7 @@ public void Interface_modifier_06_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify private and protected interfaces are valid inside classes"); - Assert.True(Interface_TestClass_modifier_06.testMethod()); + Assert.IsTrue(Interface_TestClass_modifier_06.testMethod()); } [TestMethod] @@ -131,7 +131,7 @@ public void Interface_modifier_07_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify new interface gens warning if not hiding anything"); - Assert.True(Interface_TestClass_modifier_07.testMethod()); + Assert.IsTrue(Interface_TestClass_modifier_07.testMethod()); } [TestMethod] @@ -139,7 +139,7 @@ public void Interface_modifier_08_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify new interface is valid inside classes when properly hiding an inherited member"); - Assert.True(Interface_TestClass_modifier_08.testMethod()); + Assert.IsTrue(Interface_TestClass_modifier_08.testMethod()); } [TestMethod] @@ -147,7 +147,7 @@ public void Interface_modifier_10_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify protected internal interfaces are valid inside classes"); - Assert.True(Interface_TestClass_modifier_10.testMethod()); + Assert.IsTrue(Interface_TestClass_modifier_10.testMethod()); } [TestMethod] @@ -155,7 +155,7 @@ public void Interface_semicolon_01_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest interface declared (with semi-colon) in global namespace"); - Assert.True(Interface_TestClass_semicolon_01.testMethod()); + Assert.IsTrue(Interface_TestClass_semicolon_01.testMethod()); } [TestMethod] @@ -163,7 +163,7 @@ public void Interface_semicolon_03_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest interface declared (with semi-colon) in class in default global namespace"); - Assert.True(Interface_TestClass_semicolon_03.testMethod()); + Assert.IsTrue(Interface_TestClass_semicolon_03.testMethod()); } [TestMethod] @@ -171,7 +171,7 @@ public void Interface_impl_04_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("A member of an interface-type can be assigned an instance of class that implements it"); - Assert.True(Interface_TestClass_impl_04.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_04.testMethod()); } [TestMethod] @@ -179,7 +179,7 @@ public void Interface_impl_05_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Warning gets generated when two methods implement an inherited method"); - Assert.True(Interface_TestClass_impl_05.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_05.testMethod()); } [TestMethod] @@ -187,7 +187,7 @@ public void Interface_impl_06_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Using the 'override' keyword allows you to hide previous method implementation"); - Assert.True(Interface_TestClass_impl_06.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_06.testMethod()); } [TestMethod] @@ -195,7 +195,7 @@ public void Interface_impl_07_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("A class that implements an interface with method, property, event, and indexer"); - Assert.True(Interface_TestClass_impl_07.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_07.testMethod()); } [TestMethod] @@ -203,7 +203,7 @@ public void Interface_impl_08_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing method that was defined identically by two different base-interfaces should work"); - Assert.True(Interface_TestClass_impl_08.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_08.testMethod()); } [TestMethod] @@ -211,7 +211,7 @@ public void Interface_impl_09_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing property that was defined identically by two different base-interfaces should work"); - Assert.True(Interface_TestClass_impl_09.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_09.testMethod()); } [TestMethod] @@ -219,7 +219,7 @@ public void Interface_impl_10_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing an event that was defined identically by two different base-interfaces should work"); - Assert.True(Interface_TestClass_impl_10.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_10.testMethod()); } [TestMethod] @@ -227,7 +227,7 @@ public void Interface_impl_11_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing an indexer that was defined identically by two different base-interfaces should work"); - Assert.True(Interface_TestClass_impl_11.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_11.testMethod()); } [TestMethod] @@ -235,7 +235,7 @@ public void Interface_impl_12_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("The members of base class participate in interface mapping"); - Assert.True(Interface_TestClass_impl_12.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_12.testMethod()); } [TestMethod] @@ -243,7 +243,7 @@ public void Interface_impl_13_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Two interfaces on the same object must resolve to the same reference"); - Assert.True(Interface_TestClass_impl_13.testMethod()); + Assert.IsTrue(Interface_TestClass_impl_13.testMethod()); } [TestMethod] @@ -251,7 +251,7 @@ public void Interface_implinherit_01_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Interface methods implementation inheritance map as expected (1st/2nd example in 13.4.3)"); - Assert.True(Interface_TestClass_implinherit_01.testMethod()); + Assert.IsTrue(Interface_TestClass_implinherit_01.testMethod()); } [TestMethod] @@ -259,7 +259,7 @@ public void Interface_implinherit_02_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Interface methods implementation inheritance (w/virtual) map as expected (3rd/4th example in 13.4.3)"); - Assert.True(Interface_TestClass_implinherit_02.testMethod()); + Assert.IsTrue(Interface_TestClass_implinherit_02.testMethod()); } [TestMethod] @@ -267,7 +267,7 @@ public void Interface_explicit_04_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementation of a method"); - Assert.True(Interface_TestClass_explicit_04.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_04.testMethod()); } [TestMethod] @@ -275,7 +275,7 @@ public void Interface_explicit_05_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementation of a property"); - Assert.True(Interface_TestClass_explicit_05.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_05.testMethod()); } [TestMethod] @@ -283,7 +283,7 @@ public void Interface_explicit_06_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementation of an event (Bug 89766)"); - Assert.True(Interface_TestClass_explicit_06.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_06.testMethod()); } [TestMethod] @@ -291,7 +291,7 @@ public void Interface_explicit_07_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementation of an indexer"); - Assert.True(Interface_TestClass_explicit_07.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_07.testMethod()); } [TestMethod] @@ -299,7 +299,7 @@ public void Interface_explicit_10_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implemented members (method) can be called through interface instances"); - Assert.True(Interface_TestClass_explicit_10.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_10.testMethod()); } [TestMethod] @@ -307,7 +307,7 @@ public void Interface_explicit_11_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implemented members (property) can be called through interface instances"); - Assert.True(Interface_TestClass_explicit_11.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_11.testMethod()); } [TestMethod] @@ -315,7 +315,7 @@ public void Interface_explicit_12_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implemented members (indexer) can be called through interface instances"); - Assert.True(Interface_TestClass_explicit_12.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_12.testMethod()); } [TestMethod] @@ -323,7 +323,7 @@ public void Interface_explicit_13_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implemented members (event) can be called through interface instances (Bug 89766)"); - Assert.True(Interface_TestClass_explicit_13.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_13.testMethod()); } [TestMethod] @@ -331,7 +331,7 @@ public void Interface_explicit_21_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Hidden base interface members may be implemented in all of the ways used in this"); - Assert.True(Interface_TestClass_explicit_21.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_21.testMethod()); } [TestMethod] @@ -339,7 +339,7 @@ public void Interface_explicit_25_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implementing overloaded methods should work "); - Assert.True(Interface_TestClass_explicit_25.testMethod()); + Assert.IsTrue(Interface_TestClass_explicit_25.testMethod()); } [TestMethod] @@ -347,7 +347,7 @@ public void Interface_mdfrmeth_09_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("An abstract class can implement an interface's methods as abstract"); - Assert.True(Interface_TestClass_mdfrmeth_09.testMethod()); + Assert.IsTrue(Interface_TestClass_mdfrmeth_09.testMethod()); } [TestMethod] @@ -356,7 +356,7 @@ public void Interface_ifreimp_01_Test() OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("A class that inherits an interface implementation is permitted to re-implement the interface by including it in the base class list"); // Known failure - Assert.False(Interface_TestClass_ifreimp_01.testMethod()); + Assert.IsFalse(Interface_TestClass_ifreimp_01.testMethod()); } [TestMethod] @@ -365,7 +365,7 @@ public void Interface_ifreimp_02_Test() OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Inherited public member declarations and inherited explicit interface member declarations participate in the interface mapping process for re-implemented interfaces (Bug 90165)"); // Known failure - Assert.False(Interface_TestClass_ifreimp_02.testMethod()); + Assert.IsFalse(Interface_TestClass_ifreimp_02.testMethod()); } [TestMethod] @@ -374,7 +374,7 @@ public void Interface_ifreimp_03_Test() OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Interface reimplementation also reimplements the interface's base interfaces. Verify mapping is done correctly. (90165)"); OutputHelper.WriteLine("This Test is an expected fail in the baseline, but has passed in recent testing"); - Assert.True(Interface_TestClass_ifreimp_03.testMethod()); + Assert.IsTrue(Interface_TestClass_ifreimp_03.testMethod()); } [TestMethod] @@ -382,7 +382,7 @@ public void Interface_abstract_01_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("An abstract class is permitted to map base-interface methods onto abstract methods"); - Assert.True(Interface_TestClass_abstract_01.testMethod()); + Assert.IsTrue(Interface_TestClass_abstract_01.testMethod()); } [TestMethod] @@ -390,7 +390,7 @@ public void Interface_abstract_02_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("The abstract methods implementing interface methods must be overridden by inheriting classes"); - Assert.True(Interface_TestClass_abstract_02.testMethod()); + Assert.IsTrue(Interface_TestClass_abstract_02.testMethod()); } [TestMethod] @@ -398,7 +398,7 @@ public void Interface_abstract_03_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementations are permitted to call abstract methods"); - Assert.True(Interface_TestClass_abstract_03.testMethod()); + Assert.IsTrue(Interface_TestClass_abstract_03.testMethod()); } [TestMethod] @@ -406,7 +406,7 @@ public void Interface_indexer_02_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Simplest interface indexer declaration (int)"); - Assert.True(Interface_TestClass_indexer_02.testMethod()); + Assert.IsTrue(Interface_TestClass_indexer_02.testMethod()); } [TestMethod] @@ -414,7 +414,7 @@ public void Interface_indexer_03_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Simplest interface indexer declaration (String)"); - Assert.True(Interface_TestClass_indexer_03.testMethod()); + Assert.IsTrue(Interface_TestClass_indexer_03.testMethod()); } [TestMethod] @@ -422,7 +422,7 @@ public void Interface_indexer_04_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Simplest interface indexer declaration (user-defined struct)"); - Assert.True(Interface_TestClass_indexer_04.testMethod()); + Assert.IsTrue(Interface_TestClass_indexer_04.testMethod()); } [TestMethod] @@ -430,7 +430,7 @@ public void Interface_indexer_05_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Interface indexer with multiple parameters in formal-index-parameter-list"); - Assert.True(Interface_TestClass_indexer_05.testMethod()); + Assert.IsTrue(Interface_TestClass_indexer_05.testMethod()); } [TestMethod] @@ -438,7 +438,7 @@ public void Interface_indexer_06_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Interface indexer with just get accessor"); - Assert.True(Interface_TestClass_indexer_06.testMethod()); + Assert.IsTrue(Interface_TestClass_indexer_06.testMethod()); } [TestMethod] @@ -446,7 +446,7 @@ public void Interface_indexer_07_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Interface indexer with just set accessor"); - Assert.True(Interface_TestClass_indexer_07.testMethod()); + Assert.IsTrue(Interface_TestClass_indexer_07.testMethod()); } [TestMethod] @@ -455,7 +455,7 @@ public void Interface_indexer_18_Test() OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Using 'new' on an interface member (indexer) that doesn't hide an inherited member should gen warning "); OutputHelper.WriteLine("(Related Bug: 86609)"); - Assert.True(Interface_TestClass_indexer_18.testMethod()); + Assert.IsTrue(Interface_TestClass_indexer_18.testMethod()); } [TestMethod] @@ -463,7 +463,7 @@ public void Interface_meth_09_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Using 'new' on an interface member (method) that doesn't hide an inherited member should gen warning (Bug: 86609)"); - Assert.True(Interface_TestClass_meth_09.testMethod()); + Assert.IsTrue(Interface_TestClass_meth_09.testMethod()); } [TestMethod] @@ -471,7 +471,7 @@ public void Interface_prop_09_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Using 'new' on an interface member (property) that doesn't hide an inherited member should gen warning (Bug: 86609)"); - Assert.True(Interface_TestClass_prop_09.testMethod()); + Assert.IsTrue(Interface_TestClass_prop_09.testMethod()); } [TestMethod] @@ -479,7 +479,7 @@ public void Interface_namesig_02_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Member functions of an interface may have same name if they have diff args"); - Assert.True(Interface_TestClass_namesig_02.testMethod()); + Assert.IsTrue(Interface_TestClass_namesig_02.testMethod()); } [TestMethod] @@ -487,7 +487,7 @@ public void Interface_namesig_03_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Interface member that is hidden by an inheriting interface (without using new) gens warning"); - Assert.True(Interface_TestClass_namesig_03.testMethod()); + Assert.IsTrue(Interface_TestClass_namesig_03.testMethod()); } [TestMethod] @@ -495,7 +495,7 @@ public void Interface_namesig_04_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Interface that inherits 2 other interfaces that have a member with same sig"); - Assert.True(Interface_TestClass_namesig_04.testMethod()); + Assert.IsTrue(Interface_TestClass_namesig_04.testMethod()); } [TestMethod] @@ -503,7 +503,7 @@ public void Interface_namesig_05_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Interface member that is hidden by an inheriting interface (using new) works correctly"); - Assert.True(Interface_TestClass_namesig_05.testMethod()); + Assert.IsTrue(Interface_TestClass_namesig_05.testMethod()); } [TestMethod] @@ -511,7 +511,7 @@ public void Interface_events_08_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Using 'new' on an interface member (event) that doesn't hide an inherited member should gen warning (Bug: 118831)"); - Assert.True(Interface_TestClass_events_08.testMethod()); + Assert.IsTrue(Interface_TestClass_events_08.testMethod()); } [TestMethod] @@ -519,7 +519,7 @@ public void Interface_events_09_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Simple Event declaration within an interface"); - Assert.True(Interface_TestClass_events_09.testMethod()); + Assert.IsTrue(Interface_TestClass_events_09.testMethod()); } [TestMethod] @@ -527,7 +527,7 @@ public void Interface_maccess_01_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Inherited members with same sig, from diff interfaces, can be accessed through casting"); - Assert.True(Interface_TestClass_maccess_01.testMethod()); + Assert.IsTrue(Interface_TestClass_maccess_01.testMethod()); } [TestMethod] @@ -535,7 +535,7 @@ public void Interface_maccess_03_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Inherited members with same method names but diff args can be accessed by casting"); - Assert.True(Interface_TestClass_maccess_03.testMethod()); + Assert.IsTrue(Interface_TestClass_maccess_03.testMethod()); } [TestMethod] @@ -543,7 +543,7 @@ public void Interface_maccess_04_Test() { OutputHelper.WriteLine("Section 13.2 Interface members"); OutputHelper.WriteLine("Inherited members with same method names but diff args should work if arg passed is not ambiguous (Regression bug: 90867)"); - Assert.True(Interface_TestClass_maccess_04.testMethod()); + Assert.IsTrue(Interface_TestClass_maccess_04.testMethod()); } [TestMethod] @@ -551,7 +551,7 @@ public void Interface_modifier_02_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify private interfaces gen error when declared in global namespace"); - Assert.True(Interface_TestClass_modifier_02.testMethod()); + Assert.IsTrue(Interface_TestClass_modifier_02.testMethod()); } [TestMethod] @@ -559,7 +559,7 @@ public void Interface_modifier_03_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify protected interfaces gen error when declared in global namespace"); - Assert.True(Interface_TestClass_modifier_03.testMethod()); + Assert.IsTrue(Interface_TestClass_modifier_03.testMethod()); } [TestMethod] @@ -567,7 +567,7 @@ public void Interface_struct_impl_01_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Simple struct implementation of two interfaces"); - Assert.True(Interface_TestClass_struct_impl_01.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_impl_01.testMethod()); } [TestMethod] @@ -575,7 +575,7 @@ public void Interface_struct_impl_02_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("A struct that implements an interface also implicitly implements all of the interface's base interfaces"); - Assert.True(Interface_TestClass_struct_impl_02.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_impl_02.testMethod()); } [TestMethod] @@ -583,7 +583,7 @@ public void Interface_struct_impl_04_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("A member of an interface-type can be assigned an instance of a struct that implements it"); - Assert.True(Interface_TestClass_struct_impl_04.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_impl_04.testMethod()); } [TestMethod] @@ -591,7 +591,7 @@ public void Interface_struct_impl_05_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("A struct that implements an interface with a method, property, event, and indexer"); - Assert.True(Interface_TestClass_struct_impl_05.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_impl_05.testMethod()); } [TestMethod] @@ -599,7 +599,7 @@ public void Interface_struct_impl_06_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing a method that was defined identically by two different base-interfaces should work"); - Assert.True(Interface_TestClass_struct_impl_06.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_impl_06.testMethod()); } [TestMethod] @@ -607,7 +607,7 @@ public void Interface_struct_impl_07_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing a property that was defined identically by two different base-interfaces should work"); - Assert.True(Interface_TestClass_struct_impl_07.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_impl_07.testMethod()); } [TestMethod] @@ -615,7 +615,7 @@ public void Interface_struct_impl_08_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing an event that was defined identically by two different base-interfaces should work"); - Assert.True(Interface_TestClass_struct_impl_08.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_impl_08.testMethod()); } [TestMethod] @@ -623,7 +623,7 @@ public void Interface_struct_impl_09_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing an indexer that was defined identically by two different base-interfaces should work"); - Assert.True(Interface_TestClass_struct_impl_09.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_impl_09.testMethod()); } [TestMethod] @@ -631,7 +631,7 @@ public void Interface_struct_explicit_01_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementations"); - Assert.True(Interface_TestClass_struct_explicit_01.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_01.testMethod()); } [TestMethod] @@ -639,7 +639,7 @@ public void Interface_struct_explicit_03_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Implementing an iface method in a struct that doesn't list the iface as a base iface but does list a iface that inherits the iface should work"); - Assert.True(Interface_TestClass_struct_explicit_03.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_03.testMethod()); } [TestMethod] @@ -647,7 +647,7 @@ public void Interface_struct_explicit_04_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementation of a method"); - Assert.True(Interface_TestClass_struct_explicit_04.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_04.testMethod()); } [TestMethod] @@ -655,7 +655,7 @@ public void Interface_struct_explicit_05_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementation of a property"); - Assert.True(Interface_TestClass_struct_explicit_05.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_05.testMethod()); } [TestMethod] @@ -663,7 +663,7 @@ public void Interface_struct_explicit_06_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementation of an event (Bug: 89766)"); - Assert.True(Interface_TestClass_struct_explicit_06.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_06.testMethod()); } [TestMethod] @@ -671,7 +671,7 @@ public void Interface_struct_explicit_07_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicit interface member implementation of an indexer"); - Assert.True(Interface_TestClass_struct_explicit_07.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_07.testMethod()); } [TestMethod] @@ -679,7 +679,7 @@ public void Interface_struct_explicit_09_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Multiple base interfaces and explicit interface member implementations work"); - Assert.True(Interface_TestClass_struct_explicit_09.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_09.testMethod()); } [TestMethod] @@ -687,7 +687,7 @@ public void Interface_struct_explicit_10_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implemented members (method) can be called through interface instances"); - Assert.True(Interface_TestClass_struct_explicit_10.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_10.testMethod()); } [TestMethod] @@ -695,7 +695,7 @@ public void Interface_struct_explicit_11_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implemented members (property) can be called through interface instances (Bug 90570)"); - Assert.True(Interface_TestClass_struct_explicit_11.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_11.testMethod()); } [TestMethod] @@ -703,7 +703,7 @@ public void Interface_struct_explicit_12_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implemented members (indexer) can be called through interface instances (Bug 90570)"); - Assert.True(Interface_TestClass_struct_explicit_12.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_12.testMethod()); } [TestMethod] @@ -711,7 +711,7 @@ public void Interface_struct_explicit_13_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implemented members (event) can be called through interface instances (89766)"); - Assert.True(Interface_TestClass_struct_explicit_13.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_13.testMethod()); } [TestMethod] @@ -719,7 +719,7 @@ public void Interface_struct_explicit_19_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Explicitly implementing member from interface not in base-list (but in base-list of a base interface) should work"); - Assert.True(Interface_TestClass_struct_explicit_19.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_19.testMethod()); } [TestMethod] @@ -727,7 +727,7 @@ public void Interface_struct_explicit_20_Test() { OutputHelper.WriteLine("Section 13.4 Interface implementations"); OutputHelper.WriteLine("Hidden base interface members may be implemented in all of the ways used in this"); - Assert.True(Interface_TestClass_struct_explicit_20.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_explicit_20.testMethod()); } [TestMethod] @@ -735,7 +735,7 @@ public void Interface_struct_decl_01_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest interface declared in a struct in default global namespace"); - Assert.True(Interface_TestClass_struct_decl_01.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_decl_01.testMethod()); } [TestMethod] @@ -743,7 +743,7 @@ public void Interface_struct_decl_02_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest interface declared in a struct in a declared namespace"); - Assert.True(Interface_TestClass_decl_02_NS.Interface_TestClass_decl_02.testMethod()); + Assert.IsTrue(Interface_TestClass_decl_02_NS.Interface_TestClass_decl_02.testMethod()); } [TestMethod] @@ -751,7 +751,7 @@ public void Interface_struct_inherit_01_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest form of interface inheritance, inheriting multiple interfaces"); - Assert.True(Interface_TestClass_struct_inherit_01.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_inherit_01.testMethod()); } [TestMethod] @@ -759,7 +759,7 @@ public void Interface_struct_modifier_01_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify public and internal interfaces are valid inside structs"); - Assert.True(Interface_TestClass_struct_modifier_01.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_modifier_01.testMethod()); } [TestMethod] @@ -767,7 +767,7 @@ public void Interface_struct_modifier_02_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify private interfaces are valid inside structs"); - Assert.True(Interface_TestClass_struct_modifier_02.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_modifier_02.testMethod()); } [TestMethod] @@ -775,7 +775,7 @@ public void Interface_struct_modifier_03_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Verify new interface gens warning if not hiding anything"); - Assert.True(Interface_TestClass_struct_modifier_03.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_modifier_03.testMethod()); } [TestMethod] @@ -783,7 +783,7 @@ public void Interface_struct_semicolon_01_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest interface declared (with semi-colon) in a struct in default global namespace"); - Assert.True(Interface_TestClass_struct_semicolon_01.testMethod()); + Assert.IsTrue(Interface_TestClass_struct_semicolon_01.testMethod()); } [TestMethod] @@ -791,7 +791,7 @@ public void Interface_struct_semicolon_02_Test() { OutputHelper.WriteLine("Section 13.1 Interface declarations "); OutputHelper.WriteLine("Simplest interface declared (with semi-colon) in a struct in a declared namespace"); - Assert.True(Interface_TestClass_semicolon_02_NS.Interface_TestClass_semicolon_02.testMethod()); + Assert.IsTrue(Interface_TestClass_semicolon_02_NS.Interface_TestClass_semicolon_02.testMethod()); } //Compiled Test Cases @@ -3444,14 +3444,14 @@ public SampleOrder(DateTime purchase, double cost) // OutputHelper.WriteLine($"Order on {order.Purchased} for {order.Cost}"); // } - // Assert.Equal(c.Reminders.Count, 2, "Reminders count is wrong"); - // Assert.Equal((c.Reminders[0] as Reminder).Date, reminder00Date, "Reminder 1 date is wrong"); - // Assert.Equal((c.Reminders[1] as Reminder).Subject, reminder01Subject, "Reminder 2 subject is wrong"); + // Assert.AreEqual(c.Reminders.Count, 2, "Reminders count is wrong"); + // Assert.AreEqual((c.Reminders[0] as Reminder).Date, reminder00Date, "Reminder 1 date is wrong"); + // Assert.AreEqual((c.Reminders[1] as Reminder).Subject, reminder01Subject, "Reminder 2 subject is wrong"); - // Assert.Equal(c.PreviousOrders.Count, 2, "Previous Orders count is wrong"); - // Assert.Equal(c.LastOrder.Ticks, newOrder01Date.Ticks, "Last order Previous Orders count is wrong"); - // Assert.Equal((c.PreviousOrders[0] as IOrder).Cost, newOrder00Cost, "Last order cost is wrong"); - // Assert.Equal((c.PreviousOrders[1] as IOrder).Purchased, newOrder01Date, "Last order cost is wrong"); + // Assert.AreEqual(c.PreviousOrders.Count, 2, "Previous Orders count is wrong"); + // Assert.AreEqual(c.LastOrder.Ticks, newOrder01Date.Ticks, "Last order Previous Orders count is wrong"); + // Assert.AreEqual((c.PreviousOrders[0] as IOrder).Cost, newOrder00Cost, "Last order cost is wrong"); + // Assert.AreEqual((c.PreviousOrders[1] as IOrder).Purchased, newOrder01Date, "Last order cost is wrong"); // } } diff --git a/Tests/NFUnitTestLexical/NFUnitTestLexical.nfproj b/Tests/NFUnitTestLexical/NFUnitTestLexical.nfproj index e66efeca..99c0c4fe 100644 --- a/Tests/NFUnitTestLexical/NFUnitTestLexical.nfproj +++ b/Tests/NFUnitTestLexical/NFUnitTestLexical.nfproj @@ -35,7 +35,7 @@ - + @@ -45,6 +45,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestLexical/UnitTestLExicalTest1.cs b/Tests/NFUnitTestLexical/UnitTestLExicalTest1.cs index ab4e69ba..5ac278f8 100644 --- a/Tests/NFUnitTestLexical/UnitTestLExicalTest1.cs +++ b/Tests/NFUnitTestLexical/UnitTestLExicalTest1.cs @@ -26,7 +26,7 @@ public void Lexical_comments_01_Test() { OutputHelper.WriteLine("Section 2.4.4 Test"); OutputHelper.WriteLine("Verifies valid/invalid comment"); - Assert.True(Lexical_TestClass_comments_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_comments_01.testMethod()); } [TestMethod] @@ -34,7 +34,7 @@ public void Lexical_comments_02_Test() { OutputHelper.WriteLine("Section 2.4.4 Test"); OutputHelper.WriteLine("Verifies valid/invalid comment"); - Assert.True(Lexical_TestClass_comments_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_comments_02.testMethod()); } [TestMethod] @@ -42,7 +42,7 @@ public void Lexical_comments_03_Test() { OutputHelper.WriteLine("Section 2.4.4 Test"); OutputHelper.WriteLine("Verifies valid/invalid comment"); - Assert.True(Lexical_TestClass_comments_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_comments_03.testMethod()); } [TestMethod] @@ -50,7 +50,7 @@ public void Lexical_comments_04_Test() { OutputHelper.WriteLine("Section 2.4.4 Test"); OutputHelper.WriteLine("Verifies valid/invalid comment"); - Assert.True(Lexical_TestClass_comments_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_comments_04.testMethod()); } [TestMethod] @@ -58,7 +58,7 @@ public void Lexical_comments_05_Test() { OutputHelper.WriteLine("Section 2.4.4 Test"); OutputHelper.WriteLine("Verifies valid/invalid comment"); - Assert.True(Lexical_TestClass_comments_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_comments_05.testMethod()); } [TestMethod] @@ -66,7 +66,7 @@ public void Lexical_comments_06_Test() { OutputHelper.WriteLine("Section 2.4.4 Test"); OutputHelper.WriteLine("Verifies valid/invalid comment"); - Assert.True(Lexical_TestClass_comments_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_comments_06.testMethod()); } [TestMethod] @@ -74,7 +74,7 @@ public void Lexical_comments_07_Test() { OutputHelper.WriteLine("Section 2.4.4 Test"); OutputHelper.WriteLine("Verifies valid/invalid comment"); - Assert.True(Lexical_TestClass_comments_07.testMethod()); + Assert.IsTrue(Lexical_TestClass_comments_07.testMethod()); } [TestMethod] @@ -82,7 +82,7 @@ public void Lexical_comments_10_Test() { OutputHelper.WriteLine("Section 2.4.4 Test"); OutputHelper.WriteLine("Verifies valid/invalid comment"); - Assert.True(Lexical_TestClass_comments_10.testMethod()); + Assert.IsTrue(Lexical_TestClass_comments_10.testMethod()); } [TestMethod] @@ -90,7 +90,7 @@ public void Lexical_bool_01_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify true works on bools"); - Assert.True(Lexical_TestClass_bool_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_bool_01.testMethod()); } [TestMethod] @@ -98,7 +98,7 @@ public void Lexical_bool_02_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify false works on bools"); - Assert.True(Lexical_TestClass_bool_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_bool_02.testMethod()); } [TestMethod] @@ -106,7 +106,7 @@ public void Lexical_int_01_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify 0 as int literal"); - Assert.True(Lexical_TestClass_int_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_int_01.testMethod()); } [TestMethod] @@ -114,7 +114,7 @@ public void Lexical_int_02_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify positive int literals"); - Assert.True(Lexical_TestClass_int_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_int_02.testMethod()); } [TestMethod] @@ -122,7 +122,7 @@ public void Lexical_int_03_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify negative int literals"); - Assert.True(Lexical_TestClass_int_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_int_03.testMethod()); } [TestMethod] @@ -130,7 +130,7 @@ public void Lexical_int_04_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify negative hex literals"); - Assert.True(Lexical_TestClass_int_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_int_04.testMethod()); } [TestMethod] @@ -138,7 +138,7 @@ public void Lexical_int_05_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify positive hex literals"); - Assert.True(Lexical_TestClass_int_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_int_05.testMethod()); } [TestMethod] @@ -146,7 +146,7 @@ public void Lexical_int_06_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify 0 as hex int literal"); - Assert.True(Lexical_TestClass_int_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_int_06.testMethod()); } [TestMethod] @@ -154,7 +154,7 @@ public void Lexical_intsuffix_01_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("L/l suffix on longs"); - Assert.True(Lexical_TestClass_intsuffix_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_intsuffix_01.testMethod()); } [TestMethod] @@ -162,7 +162,7 @@ public void Lexical_intsuffix_02_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("LU, Ul,uL,ul,LU,Lu,lU,lu suffix on ulongs"); - Assert.True(Lexical_TestClass_intsuffix_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_intsuffix_02.testMethod()); } [TestMethod] @@ -170,7 +170,7 @@ public void Lexical_intsuffix_03_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("LU, Ul,uL,ul,LU,Lu,lU,lu suffix on ulongs"); - Assert.True(Lexical_TestClass_intsuffix_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_intsuffix_03.testMethod()); } [TestMethod] @@ -178,7 +178,7 @@ public void Lexical_intsuffix_04_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("Verify UL,Ul,uL,ul,LU,Lu,lU,lu suffix are of type ulong"); - Assert.True(Lexical_TestClass_intsuffix_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_intsuffix_04.testMethod()); } [TestMethod] @@ -186,7 +186,7 @@ public void Lexical_intsuffix_06_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("Verify L, l suffixes are of type uint"); - Assert.True(Lexical_TestClass_intsuffix_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_intsuffix_06.testMethod()); } [TestMethod] @@ -194,7 +194,7 @@ public void Lexical_intsuffix_07_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("Using the lowercase 'l' suffix should generate a level 4 warning (VS7:86407)"); - Assert.True(Lexical_TestClass_intsuffix_07.testMethod()); + Assert.IsTrue(Lexical_TestClass_intsuffix_07.testMethod()); } [TestMethod] @@ -202,7 +202,7 @@ public void Lexical_suff_typepick_03_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("Verify that literals with l, L suffixes are typed according to spec"); - Assert.True(Lexical_TestClass_suff_typepick_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_suff_typepick_03.testMethod()); } [TestMethod] @@ -210,14 +210,14 @@ public void Lexical_real_01_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify (+/-) double double literals"); - Assert.True(Lexical_TestClass_real_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_real_01.testMethod()); } [TestMethod] public void Lexical_real_02_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); - Assert.True(Lexical_TestClass_real_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_real_02.testMethod()); } [TestMethod] @@ -225,7 +225,7 @@ public void Lexical_real_03_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify (-/+) non-double double literals"); - Assert.True(Lexical_TestClass_real_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_real_03.testMethod()); } [TestMethod] @@ -233,7 +233,7 @@ public void Lexical_real_04_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify E and e (-/+) as double literals"); - Assert.True(Lexical_TestClass_real_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_real_04.testMethod()); } [TestMethod] @@ -241,7 +241,7 @@ public void Lexical_real_05_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify E and e (-/+) as double literals"); - Assert.True(Lexical_TestClass_real_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_real_05.testMethod()); } [TestMethod] @@ -249,7 +249,7 @@ public void Lexical_real_06_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify E and e (-/+) as double literals"); - Assert.True(Lexical_TestClass_real_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_real_06.testMethod()); } [TestMethod] @@ -257,7 +257,7 @@ public void Lexical_char_01_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify keyboard symbols as chars"); - Assert.True(Lexical_TestClass_char_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_char_01.testMethod()); } [TestMethod] @@ -265,7 +265,7 @@ public void Lexical_char_02_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify all escape sequences in section 2.4.9.4"); - Assert.True(Lexical_TestClass_char_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_char_02.testMethod()); } [TestMethod] @@ -273,7 +273,7 @@ public void Lexical_char_03_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("Hex encoded Unicode characters"); - Assert.True(Lexical_TestClass_char_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_char_03.testMethod()); } [TestMethod] @@ -282,7 +282,7 @@ public void Lexical_realsuffix_01_Test() OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("D/d suffix on double literals"); OutputHelper.WriteLine("Real suffixes"); - Assert.True(Lexical_TestClass_realsuffix_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_realsuffix_01.testMethod()); } [TestMethod] @@ -291,7 +291,7 @@ public void Lexical_realsuffix_02_Test() OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("F/f suffix on float literals"); OutputHelper.WriteLine("Real suffixes"); - Assert.True(Lexical_TestClass_realsuffix_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_realsuffix_02.testMethod()); } [TestMethod] @@ -299,7 +299,7 @@ public void Lexical_string_01_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify escape sequences in string literals"); - Assert.True(Lexical_TestClass_string_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_string_01.testMethod()); } [TestMethod] @@ -307,7 +307,7 @@ public void Lexical_string_02_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify hex escape sequences in string literals"); - Assert.True(Lexical_TestClass_string_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_string_02.testMethod()); } [TestMethod] @@ -315,7 +315,7 @@ public void Lexical_string_03_Test() { OutputHelper.WriteLine("Section 2.4.9 Test"); OutputHelper.WriteLine("verify null strings work"); - Assert.True(Lexical_TestClass_string_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_string_03.testMethod()); } [TestMethod] @@ -323,7 +323,7 @@ public void Lexical_pre_001_Test() { OutputHelper.WriteLine("Section 2.3Preprocessing"); OutputHelper.WriteLine("simple pre processor"); - Assert.True(Lexical_TestClass_pre_001.testMethod()); + Assert.IsTrue(Lexical_TestClass_pre_001.testMethod()); } [TestMethod] @@ -331,7 +331,7 @@ public void Lexical_pre_004_Test() { OutputHelper.WriteLine("Section 2.3Preprocessing"); OutputHelper.WriteLine("Verify that class name namespace isn't searched"); - Assert.True(Lexical_TestClass_pre_004.testMethod()); + Assert.IsTrue(Lexical_TestClass_pre_004.testMethod()); } [TestMethod] @@ -339,7 +339,7 @@ public void Lexical_pre_005_Test() { OutputHelper.WriteLine("Section 2.3Preprocessing"); OutputHelper.WriteLine("Verify that invalid syntax doesn't mess up compiler in non-ifdef sections"); - Assert.True(Lexical_TestClass_pre_005.testMethod()); + Assert.IsTrue(Lexical_TestClass_pre_005.testMethod()); } [TestMethod] @@ -347,7 +347,7 @@ public void Lexical_pre_008_Test() { OutputHelper.WriteLine("Section 2.3Preprocessing"); OutputHelper.WriteLine("Verify #elif and #else"); - Assert.True(Lexical_TestClass_pre_008.testMethod()); + Assert.IsTrue(Lexical_TestClass_pre_008.testMethod()); } [TestMethod] @@ -355,7 +355,7 @@ public void Lexical_preproc_09_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#warning verification"); - Assert.True(Lexical_TestClass_preproc_09.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_09.testMethod()); } [TestMethod] @@ -364,7 +364,7 @@ public void Lexical_preproc_30_Test() OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verifying comments and #preprocessor items"); OutputHelper.WriteLine("This define should not be included #define TEST "); - Assert.True(Lexical_TestClass_preproc_30.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_30.testMethod()); } [TestMethod] @@ -372,7 +372,7 @@ public void Lexical_preproc_38_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the code that is skipped because of an #if is not checked by compiler at all"); - Assert.True(Lexical_TestClass_preproc_38.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_38.testMethod()); } [TestMethod] @@ -380,7 +380,7 @@ public void Lexical_line_02_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#line: Valid integer-literal passed to #line should work correctly with a real warning"); - Assert.True(Lexical_TestClass_line_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_line_02.testMethod()); } [TestMethod] @@ -388,7 +388,7 @@ public void Lexical_line_03_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#line: Valid integer-literal passed to #line should work correctly with a #warning directive"); - Assert.True(Lexical_TestClass_line_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_line_03.testMethod()); } [TestMethod] @@ -396,7 +396,7 @@ public void Lexical_line_06_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#line: Valid integer-literal/string-literal passed to #line should work correctly with a real warning"); - Assert.True(Lexical_TestClass_line_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_line_06.testMethod()); } [TestMethod] @@ -404,7 +404,7 @@ public void Lexical_line_07_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#line: Valid integer-literal/string-literal passed to #line should work correctly with a #warning directive"); - Assert.True(Lexical_TestClass_line_07.testMethod()); + Assert.IsTrue(Lexical_TestClass_line_07.testMethod()); } [TestMethod] @@ -412,7 +412,7 @@ public void Lexical_line_26_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#line: Should work cleanly inside an #if-#endif block that evaluates to false"); - Assert.True(Lexical_TestClass_line_26.testMethod()); + Assert.IsTrue(Lexical_TestClass_line_26.testMethod()); } [TestMethod] @@ -420,7 +420,7 @@ public void Lexical_line_35_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#line: #line default in a false #if block should compile cleanly"); - Assert.True(Lexical_TestClass_line_35.testMethod()); + Assert.IsTrue(Lexical_TestClass_line_35.testMethod()); } [TestMethod] @@ -428,7 +428,7 @@ public void Lexical_region_01_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Make sure #region works without banner text"); - Assert.True(Lexical_TestClass_region_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_01.testMethod()); } [TestMethod] @@ -436,7 +436,7 @@ public void Lexical_region_02_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Make sure #region works with banner text"); - Assert.True(Lexical_TestClass_region_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_02.testMethod()); } [TestMethod] @@ -444,7 +444,7 @@ public void Lexical_region_05_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Nesting a #region inside another should work "); - Assert.True(Lexical_TestClass_region_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_05.testMethod()); } [TestMethod] @@ -452,7 +452,7 @@ public void Lexical_region_06_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Nesting five #region blocks should compile successfully "); - Assert.True(Lexical_TestClass_region_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_06.testMethod()); } [TestMethod] @@ -460,7 +460,7 @@ public void Lexical_region_07_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Nesting two #region blocks within a single #region block should compile successfully "); - Assert.True(Lexical_TestClass_region_07.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_07.testMethod()); } [TestMethod] @@ -468,7 +468,7 @@ public void Lexical_region_10_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Make sure #region works with banner text enclosed in double-quotes"); - Assert.True(Lexical_TestClass_region_10.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_10.testMethod()); } [TestMethod] @@ -476,7 +476,7 @@ public void Lexical_region_11_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("A single-line comment following a #region should compile successfully"); - Assert.True(Lexical_TestClass_region_11.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_11.testMethod()); } [TestMethod] @@ -484,7 +484,7 @@ public void Lexical_region_12_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("A single-line comment following an #endregion should compile successfully"); - Assert.True(Lexical_TestClass_region_12.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_12.testMethod()); } [TestMethod] @@ -492,7 +492,7 @@ public void Lexical_region_15_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Any text following the #endregion directive should be ignored"); - Assert.True(Lexical_TestClass_region_15.testMethod()); + Assert.IsTrue(Lexical_TestClass_region_15.testMethod()); } [TestMethod] @@ -500,7 +500,7 @@ public void Lexical_lineterm_01_Test() { OutputHelper.WriteLine("Section 2.4 Lexical Analysis"); OutputHelper.WriteLine("Test different ways to end a line with semi-colon"); - Assert.True(Lexical_TestClass_lineterm_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_lineterm_01.testMethod()); } [TestMethod] @@ -508,7 +508,7 @@ public void Lexical_atkeyword_03_Test() { OutputHelper.WriteLine("Section 2.4 Lexical Analysis - Keywords"); OutputHelper.WriteLine("The identifiers @test and test should refer to the same variable"); - Assert.True(Lexical_TestClass_atkeyword_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_atkeyword_03.testMethod()); } [TestMethod] @@ -516,7 +516,7 @@ public void Lexical_atkeyword_04_Test() { OutputHelper.WriteLine("Section 2.4 Lexical Analysis - Keywords"); OutputHelper.WriteLine("Verify that 'if' can be an identifier using unicode escape sequences as well as an @keyword"); - Assert.True(Lexical_TestClass_atkeyword_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_atkeyword_04.testMethod()); } [TestMethod] @@ -524,7 +524,7 @@ public void Lexical_atkeyword_05_Test() { OutputHelper.WriteLine("Section 2.4 Lexical Analysis - Keywords"); OutputHelper.WriteLine("Verify that prefixing an identifer that is prefixed by a double underscore does not generate warning"); - Assert.True(Lexical_TestClass_atkeyword_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_atkeyword_05.testMethod()); } [TestMethod] @@ -532,7 +532,7 @@ public void Lexical_ident_01_Test() { OutputHelper.WriteLine("Section 2.4.7 Identifiers"); OutputHelper.WriteLine("identifier-start-character can be alphabetic"); - Assert.True(Lexical_TestClass_ident_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_ident_01.testMethod()); } [TestMethod] @@ -540,7 +540,7 @@ public void Lexical_ident_02_Test() { OutputHelper.WriteLine("Section 2.4.7 Identifiers"); OutputHelper.WriteLine("identifier-start-character can be an underscore"); - Assert.True(Lexical_TestClass_ident_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_ident_02.testMethod()); } [TestMethod] @@ -548,7 +548,7 @@ public void Lexical_ident_03_Test() { OutputHelper.WriteLine("Section 2.4.7 Identifiers"); OutputHelper.WriteLine("identifier-part-character can be a number"); - Assert.True(Lexical_TestClass_ident_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_ident_03.testMethod()); } [TestMethod] @@ -556,7 +556,7 @@ public void Lexical_ident_04_Test() { OutputHelper.WriteLine("Section 2.4.7 Identifiers"); OutputHelper.WriteLine("identifier-part-character can be a number (in the middle)"); - Assert.True(Lexical_TestClass_ident_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_ident_04.testMethod()); } [TestMethod] @@ -564,7 +564,7 @@ public void Lexical_ident_05_Test() { OutputHelper.WriteLine("Section 2.4.2 Identifiers"); OutputHelper.WriteLine("Identifiers that start with double underscores (__) should not generate a warning/error though it used to"); - Assert.True(Lexical_TestClass_ident_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_ident_05.testMethod()); } [TestMethod] @@ -572,7 +572,7 @@ public void Lexical_ident_06_Test() { OutputHelper.WriteLine("Section 2.4.2 Identifiers"); OutputHelper.WriteLine("Identifiers that have embedded double underscores (__) should generate a warning/error though it used to"); - Assert.True(Lexical_TestClass_ident_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_ident_06.testMethod()); } [TestMethod] @@ -580,14 +580,14 @@ public void Lexical_ident_07_Test() { OutputHelper.WriteLine("Section 2.4.2 Identifiers"); OutputHelper.WriteLine("Identifiers that end with double underscores (__) should generate a warning/error though it used to"); - Assert.True(Lexical_TestClass_ident_07.testMethod()); + Assert.IsTrue(Lexical_TestClass_ident_07.testMethod()); } [TestMethod] public void Lexical_nullunicode_01_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("A \\u0000 within comments should not stop compiler from reading to EOF"); - Assert.True(Lexical_TestClass_nullunicode_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_nullunicode_01.testMethod()); } [TestMethod] @@ -595,7 +595,7 @@ public void Lexical_nullunicode_03_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("A \\u0000 in a string should be equal to \x0000 and \0"); - Assert.True(Lexical_TestClass_nullunicode_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_nullunicode_03.testMethod()); } [TestMethod] @@ -603,7 +603,7 @@ public void Lexical_nullunicode_04_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("A \\u0000 is ignored if within preprocessor-excluded code"); - Assert.True(Lexical_TestClass_nullunicode_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_nullunicode_04.testMethod()); } [TestMethod] @@ -611,7 +611,7 @@ public void Lexical_unicode_02_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("A simple program that is saved as utf-8 with Notepad compiles and runs correctly."); - Assert.True(Lexical_TestClass_unicode_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_02.testMethod()); } [TestMethod] @@ -619,7 +619,7 @@ public void Lexical_unicode_04_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Displaying a unicode character with OutputHelper.WriteLine(().ToString())"); - Assert.True(Lexical_TestClass_unicode_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_04.testMethod()); } [TestMethod] @@ -628,7 +628,7 @@ public void Lexical_unicode_05_Test() OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Displaying a unicode character with OutputHelper.WriteLine(().ToString())"); OutputHelper.WriteLine("Since the correct language is not installed on my machine, should get a 'QQQ' as output"); - Assert.True(Lexical_TestClass_unicode_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_05.testMethod()); } [TestMethod] @@ -636,7 +636,7 @@ public void Lexical_unicode_06_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Identifier whose name is defined with \\uXXXX works correctly (Bug 111180)"); - Assert.True(Lexical_TestClass_unicode_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_06.testMethod()); } [TestMethod] @@ -644,7 +644,7 @@ public void Lexical_unicode_07_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Identifier whose name starts with \\uXXXX works correctly"); - Assert.True(Lexical_TestClass_unicode_07.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_07.testMethod()); } [TestMethod] @@ -652,7 +652,7 @@ public void Lexical_unicode_08_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Identifier whose name has a \\uXXXX in the middle of it works correctly"); - Assert.True(Lexical_TestClass_unicode_08.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_08.testMethod()); } [TestMethod] @@ -660,7 +660,7 @@ public void Lexical_unicode_09_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Identifier whose name ends with a \\uXXXX works correctly "); - Assert.True(Lexical_TestClass_unicode_09.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_09.testMethod()); } [TestMethod] @@ -669,7 +669,7 @@ public void Lexical_unicode_10_Test() OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Unicode escape sequence to start preprocessor identifier"); OutputHelper.WriteLine("Bug #33538 - Fixed"); - Assert.True(Lexical_TestClass_unicode_10.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_10.testMethod()); } [TestMethod] @@ -678,7 +678,7 @@ public void Lexical_unicode_11_Test() OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Unicode escape sequence to start preprocessor identifier"); OutputHelper.WriteLine("Bug #33538 - Fixed"); - Assert.True(Lexical_TestClass_unicode_11.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_11.testMethod()); } [TestMethod] @@ -687,7 +687,7 @@ public void Lexical_unicode_12_Test() OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Unicode escape sequence to start preprocessor identifier"); OutputHelper.WriteLine("Bug #33538 - Fixed"); - Assert.True(Lexical_TestClass_unicode_12.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_12.testMethod()); } [TestMethod] @@ -696,7 +696,7 @@ public void Lexical_unicode_13_Test() OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Unicode escape sequence in middle of a #define (#de\\u0066ine)"); OutputHelper.WriteLine("Bug #33538 - Fixed"); - Assert.True(Lexical_TestClass_unicode_13.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_13.testMethod()); } [TestMethod] @@ -704,7 +704,7 @@ public void Lexical_unicode_17_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("The literal \\u0000 should not be interpreted as a unicode escape sequence"); - Assert.True(Lexical_TestClass_unicode_17.testMethod()); + Assert.IsTrue(Lexical_TestClass_unicode_17.testMethod()); } [TestMethod] @@ -712,7 +712,7 @@ public void Lexical_uni8digit_01_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Identifier whose name is defined with \\uXXXXXXXX works correctly"); - Assert.True(Lexical_TestClass_uni8digit_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_uni8digit_01.testMethod()); } [TestMethod] @@ -720,7 +720,7 @@ public void Lexical_uni8digit_02_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Using OutputHelper.WriteLine with \\uXXXXXXXX works correctly"); - Assert.True(Lexical_TestClass_uni8digit_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_uni8digit_02.testMethod()); } [TestMethod] @@ -728,7 +728,7 @@ public void Lexical_uni8digit_03_Test() { OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); OutputHelper.WriteLine("Verify valid boundaries of values for \\uXXXXXXXX work correctly"); - Assert.True(Lexical_TestClass_uni8digit_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_uni8digit_03.testMethod()); } [TestMethod] @@ -736,7 +736,7 @@ public void Lexical_atstrings_01_Test() { OutputHelper.WriteLine("Back-Quoted String Test"); OutputHelper.WriteLine("Newlines should be valid within @-quoted string literals"); - Assert.True(Lexical_TestClass_atstrings_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_atstrings_01.testMethod()); } [TestMethod] @@ -744,7 +744,7 @@ public void Lexical_atstrings_02_Test() { OutputHelper.WriteLine("Back-Quoted String Test"); OutputHelper.WriteLine("Unicode escape sequences are not processed within @-quoted string literals"); - Assert.True(Lexical_TestClass_atstrings_02.testMethod()); + Assert.IsTrue(Lexical_TestClass_atstrings_02.testMethod()); } [TestMethod] @@ -752,7 +752,7 @@ public void Lexical_atstrings_03_Test() { OutputHelper.WriteLine("Back-Quoted String Test"); OutputHelper.WriteLine("Slash escape sequences are not processed within @-quoted string literals"); - Assert.True(Lexical_TestClass_atstrings_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_atstrings_03.testMethod()); } [TestMethod] @@ -760,7 +760,7 @@ public void Lexical_atstrings_04_Test() { OutputHelper.WriteLine("Back-Quoted String Test"); OutputHelper.WriteLine("Passing @-quoted strings to OutputHelper.WriteLine(().ToString()) should work"); - Assert.True(Lexical_TestClass_atstrings_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_atstrings_04.testMethod()); } [TestMethod] @@ -768,7 +768,7 @@ public void Lexical_mscombo_01_Test() { OutputHelper.WriteLine("XML Doc Test (Just lexical tests, no output validation)"); OutputHelper.WriteLine("Combination of multi and single line xml doc comments"); - Assert.True(Lexical_TestClass_mscombo_01.testMethod()); + Assert.IsTrue(Lexical_TestClass_mscombo_01.testMethod()); } [TestMethod] @@ -776,7 +776,7 @@ public void Lexical_mscombo_05_Test() { OutputHelper.WriteLine("XML Doc Test (Just lexical tests, no output validation)"); OutputHelper.WriteLine("Combination of multi and single line xml doc comments"); - Assert.True(Lexical_TestClass_mscombo_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_mscombo_05.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestLexical/UnitTestLexicalTest2.cs b/Tests/NFUnitTestLexical/UnitTestLexicalTest2.cs index f4f82d55..dfe685a9 100644 --- a/Tests/NFUnitTestLexical/UnitTestLexicalTest2.cs +++ b/Tests/NFUnitTestLexical/UnitTestLexicalTest2.cs @@ -75,7 +75,7 @@ public void Lexical_pre_009_Test() { OutputHelper.WriteLine("Section 2.3Preprocessing"); OutputHelper.WriteLine("Verify #define and #undef"); - Assert.True(Lexical_TestClass_pre_009.testMethod()); + Assert.IsTrue(Lexical_TestClass_pre_009.testMethod()); } [TestMethod] @@ -83,7 +83,7 @@ public void Lexical_pre_012_Test() { OutputHelper.WriteLine("Section 2.3Preprocessing"); OutputHelper.WriteLine("Verify #if operators and parens"); - Assert.True(Lexical_TestClass_pre_012.testMethod()); + Assert.IsTrue(Lexical_TestClass_pre_012.testMethod()); } [TestMethod] @@ -91,7 +91,7 @@ public void Lexical_pre_013_Test() { OutputHelper.WriteLine("Section 2.3Preprocessing"); OutputHelper.WriteLine("Verify # commands with comments"); - Assert.True(Lexical_TestClass_pre_013.testMethod()); + Assert.IsTrue(Lexical_TestClass_pre_013.testMethod()); } [TestMethod] @@ -99,7 +99,7 @@ public void Lexical_preproc_03_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#define/#undef - verify #define works"); - Assert.True(Lexical_TestClass_preproc_03.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_03.testMethod()); } [TestMethod] @@ -107,7 +107,7 @@ public void Lexical_preproc_04_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("#define/#undef - verify #undef works"); - Assert.True(Lexical_TestClass_preproc_04.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_04.testMethod()); } [TestMethod] @@ -115,7 +115,7 @@ public void Lexical_preproc_05_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Exact example used in spec definition - 2.3.1"); - Assert.True(Lexical_TestClass_preproc_05.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_05.testMethod()); } [TestMethod] @@ -123,7 +123,7 @@ public void Lexical_preproc_06_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Using #undef on a non-existing identifier compiles fine"); - Assert.True(Lexical_TestClass_preproc_06.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_06.testMethod()); } [TestMethod] @@ -131,7 +131,7 @@ public void Lexical_preproc_07_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Nested #if's"); - Assert.True(Lexical_TestClass_preproc_07.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_07.testMethod()); } [TestMethod] @@ -139,7 +139,7 @@ public void Lexical_preproc_15_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the ! operator on #identifiers"); - Assert.True(Lexical_TestClass_preproc_15.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_15.testMethod()); } [TestMethod] @@ -147,7 +147,7 @@ public void Lexical_preproc_16_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the ! operator on #identifiers with parenthesis"); - Assert.True(Lexical_TestClass_preproc_16.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_16.testMethod()); } [TestMethod] @@ -155,7 +155,7 @@ public void Lexical_preproc_17_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the double ampersand operator works"); - Assert.True(Lexical_TestClass_preproc_17.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_17.testMethod()); } [TestMethod] @@ -163,7 +163,7 @@ public void Lexical_preproc_18_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the double ampersand operator works with parentheses"); - Assert.True(Lexical_TestClass_preproc_18.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_18.testMethod()); } [TestMethod] @@ -171,7 +171,7 @@ public void Lexical_preproc_19_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the || operator works "); - Assert.True(Lexical_TestClass_preproc_19.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_19.testMethod()); } [TestMethod] @@ -179,7 +179,7 @@ public void Lexical_preproc_20_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the || operator works with parentheses"); - Assert.True(Lexical_TestClass_preproc_20.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_20.testMethod()); } [TestMethod] @@ -187,7 +187,7 @@ public void Lexical_preproc_21_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the == operator works with/without parentheses"); - Assert.True(Lexical_TestClass_preproc_21.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_21.testMethod()); } [TestMethod] @@ -195,14 +195,14 @@ public void Lexical_preproc_22_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the != operator works with/without parentheses"); - Assert.True(Lexical_TestClass_preproc_22.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_22.testMethod()); } [TestMethod] public void Lexical_preproc_23_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Grouping operators: ! double ampersand || != == true false"); - Assert.True(Lexical_TestClass_preproc_23.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_23.testMethod()); } [TestMethod] @@ -210,7 +210,7 @@ public void Lexical_preproc_24_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verifying comments and #preprocessor items"); - Assert.True(Lexical_TestClass_preproc_24.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_24.testMethod()); } [TestMethod] @@ -218,7 +218,7 @@ public void Lexical_preproc_25_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verifying comments and #preprocessor items"); - Assert.True(Lexical_TestClass_preproc_25.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_25.testMethod()); } [TestMethod] @@ -226,7 +226,7 @@ public void Lexical_preproc_31_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verifying comments and #preprocessor items"); - Assert.True(Lexical_TestClass_preproc_31.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_31.testMethod()); } [TestMethod] @@ -234,7 +234,7 @@ public void Lexical_preproc_32_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify the usage of #elif"); - Assert.True(Lexical_TestClass_preproc_32.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_32.testMethod()); } [TestMethod] @@ -242,7 +242,7 @@ public void Lexical_preproc_39_Test() { OutputHelper.WriteLine("Section 2.3 Preprocessing"); OutputHelper.WriteLine("Verify that a # keyword (i.e. for) can be used as a #preprocessor identifier"); - Assert.True(Lexical_TestClass_preproc_39.testMethod()); + Assert.IsTrue(Lexical_TestClass_preproc_39.testMethod()); } //Compiled Test Cases diff --git a/Tests/NFUnitTestNamespace/NFUnitTestNamespace.nfproj b/Tests/NFUnitTestNamespace/NFUnitTestNamespace.nfproj index 38bfaabf..a7f7a4b4 100644 --- a/Tests/NFUnitTestNamespace/NFUnitTestNamespace.nfproj +++ b/Tests/NFUnitTestNamespace/NFUnitTestNamespace.nfproj @@ -44,7 +44,7 @@ - + @@ -54,6 +54,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestNamespace/UnitTestNamespaceTests.cs b/Tests/NFUnitTestNamespace/UnitTestNamespaceTests.cs index bd0169df..2e38e5fe 100644 --- a/Tests/NFUnitTestNamespace/UnitTestNamespaceTests.cs +++ b/Tests/NFUnitTestNamespace/UnitTestNamespaceTests.cs @@ -21,7 +21,7 @@ public void NS_attribute_01_Test() { OutputHelper.WriteLine("Section 9.1 Compilation Units"); OutputHelper.WriteLine("Verify that the CLSCompliant attribute is allowed at the assembly level in a comp. unit"); - Assert.True(NS_TestClass_attribute_01.testMethod()); + Assert.IsTrue(NS_TestClass_attribute_01.testMethod()); } [TestMethod] @@ -29,7 +29,7 @@ public void NS_attribute_02_Test() { OutputHelper.WriteLine("Section 9.1 Compilation Units"); OutputHelper.WriteLine("Verify that the CLSCompliant attribute is allowed at the module level in a comp. unit (cause a warning)"); - Assert.True(NS_TestClass_attribute_02.testMethod()) ; + Assert.IsTrue(NS_TestClass_attribute_02.testMethod()) ; } [TestMethod] @@ -37,7 +37,7 @@ public void NS_compunit_01_Test() { OutputHelper.WriteLine("Section 9.1 Compilation Units"); OutputHelper.WriteLine("Verify that a program with multiple files depending on each other works"); - Assert.True(NS_TestClass_compunit_01.testMethod()) ; + Assert.IsTrue(NS_TestClass_compunit_01.testMethod()) ; } [TestMethod] @@ -45,7 +45,7 @@ public void NS_compunit_03_Test() { OutputHelper.WriteLine("Section 9.1 Compilation Units"); OutputHelper.WriteLine("Verify three source files all requiring each other in circular fashion compiles/runs successfully"); - Assert.True(NS_TestClass_compunit_03.testMethod()); + Assert.IsTrue(NS_TestClass_compunit_03.testMethod()); } [TestMethod] @@ -53,7 +53,7 @@ public void NS_compunit_04_Test() { OutputHelper.WriteLine("Section 9.1 Compilation Units"); OutputHelper.WriteLine("Two source files with their own namespaces, each have a class named A, and can be used successfully by a third file"); - Assert.True(NS_TestClass_compunit_04.testMethod()); + Assert.IsTrue(NS_TestClass_compunit_04.testMethod()); } [TestMethod] @@ -61,7 +61,7 @@ public void NS_decl_01_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Declare the simplest namespace possible (without semi-colon at the end)"); - Assert.True(NS_TestClass_decl_01.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_01.A.testMethod()); } [TestMethod] @@ -69,7 +69,7 @@ public void NS_decl_02_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Declare the simplest namespace possible (with semi-colon at the end)"); - Assert.True(NS_TestClass_decl_02.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_02.A.testMethod()); } [TestMethod] @@ -77,7 +77,7 @@ public void NS_decl_03_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Declare a namespace inside another namespace"); - Assert.True(NS_TestClass_decl_03.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_03.A.testMethod()); } [TestMethod] @@ -85,7 +85,7 @@ public void NS_decl_04_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Declare a namespace inside another namespace (with semicolon at end of nested ns decl)"); - Assert.True(NS_TestClass_decl_04.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_04.A.testMethod()); } [TestMethod] @@ -93,7 +93,7 @@ public void NS_decl_05_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Two separately declared namespaces in one compilation unit (file)"); - Assert.True(NS_TestClass_decl_05.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_05.A.testMethod()); } [TestMethod] @@ -101,7 +101,7 @@ public void NS_decl_06_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Two separately declared namespaces in one compilation unit (file)"); - Assert.True(NS_TestClass_decl_06.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_06.A.testMethod()); } [TestMethod] @@ -109,7 +109,7 @@ public void NS_decl_08_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Access class member declared in external namespace directly when adding a Using"); - Assert.True(NS_TestClass_decl_08.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_08.A.testMethod()); } [TestMethod] @@ -117,7 +117,7 @@ public void NS_decl_10_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Namespace identifier with . in it"); - Assert.True(NS_TestClass_decl_10.foo.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_10.foo.A.testMethod()); } [TestMethod] @@ -125,7 +125,7 @@ public void NS_decl_11_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Namespace identifier with .'s in it and underscores, etc."); - Assert.True(NS_TestClass_decl_11.foo.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_11.foo.A.testMethod()); } [TestMethod] @@ -133,7 +133,7 @@ public void NS_decl_12_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Two separate namespace declarations contribute to same declaration space (with using)"); - Assert.True(NS_TestClass_decl_12.foo.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_12.foo.A.testMethod()); } [TestMethod] @@ -141,7 +141,7 @@ public void NS_decl_13_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Two separate namespace declarations contribute to same declaration space (direct referencing)"); - Assert.True(NS_TestClass_decl_13.foo.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_13.foo.A.testMethod()); } [TestMethod] @@ -150,7 +150,7 @@ public void NS_decl_14_Test() OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Two separate namespace declarations contribute to same declaration space (direct referencing)"); OutputHelper.WriteLine(" namespace declarations are in two different compilation units (files)"); - Assert.True(NS_TestClass_decl_14.foo.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_14.foo.A.testMethod()); } [TestMethod] @@ -159,7 +159,7 @@ public void NS_decl_15_Test() OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Two separate namespace declarations contribute to same declaration space (with using)"); OutputHelper.WriteLine(" namespace declarations are in two different compilation units (files)"); - Assert.True(NS_TestClass_decl_15.foo.A.testMethod()); + Assert.IsTrue(NS_TestClass_decl_15.foo.A.testMethod()); } [TestMethod] @@ -167,7 +167,7 @@ public void NS_decl_17_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Declare a namespace called _Foo"); - Assert.True(NS_TestClass_decl_17.main.testMethod()); + Assert.IsTrue(NS_TestClass_decl_17.main.testMethod()); } [TestMethod] @@ -175,7 +175,7 @@ public void NS_decl_20_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Declare an empty namespace"); - Assert.True(NS_TestClass_decl_20.main.testMethod()); + Assert.IsTrue(NS_TestClass_decl_20.main.testMethod()); } [TestMethod] @@ -183,7 +183,7 @@ public void NS_decl_21_Test() { OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); OutputHelper.WriteLine("Declare ten empty nested namespaces (with and without semi-colons)"); - Assert.True(NS_TestClass_decl_21.main.testMethod()); + Assert.IsTrue(NS_TestClass_decl_21.main.testMethod()); } [TestMethod] @@ -191,7 +191,7 @@ public void NS_alias_01_Test() { OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); OutputHelper.WriteLine("Verify simplest form of alias reference to a namespace"); - Assert.True(NS_TestClass_alias_01.A.testMethod()); + Assert.IsTrue(NS_TestClass_alias_01.A.testMethod()); } [TestMethod] @@ -199,7 +199,7 @@ public void NS_alias_02_Test() { OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); OutputHelper.WriteLine("Verify simplest form of alias reference to a namespace with .'s"); - Assert.True(NS_TestClass_alias_02.A.testMethod()); + Assert.IsTrue(NS_TestClass_alias_02.A.testMethod()); } [TestMethod] @@ -207,7 +207,7 @@ public void NS_alias_03_Test() { OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); OutputHelper.WriteLine("Verify simplest form of alias reference to a specific type in a namespace"); - Assert.True(NS_TestClass_alias_03.A.testMethod()); + Assert.IsTrue(NS_TestClass_alias_03.A.testMethod()); } [TestMethod] @@ -215,7 +215,7 @@ public void NS_alias_04_Test() { OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); OutputHelper.WriteLine("Verify simplest form of alias reference to a specific type in a namespace"); - Assert.True(NS_TestClass_alias_04.B.testMethod()); + Assert.IsTrue(NS_TestClass_alias_04.B.testMethod()); } [TestMethod] @@ -223,7 +223,7 @@ public void NS_alias_10_Test() { OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); OutputHelper.WriteLine("Third code example in 9.3.1 - unique alias identifiers"); - Assert.True(NS_TestClass_alias_10.main.testMethod()); + Assert.IsTrue(NS_TestClass_alias_10.main.testMethod()); } [TestMethod] @@ -231,7 +231,7 @@ public void NS_alias_13_Test() { OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); OutputHelper.WriteLine("A using-alias-directive can create an alias for the namespace in which it appears"); - Assert.True(NS_TestClass_alias_13.main.testMethod()); + Assert.IsTrue(NS_TestClass_alias_13.main.testMethod()); } [TestMethod] @@ -239,7 +239,7 @@ public void NS_alias_14_Test() { OutputHelper.WriteLine("Section 9.3.1 Using namespace directives "); OutputHelper.WriteLine("A using-alias-directive can create an alias for a type declared within the ns in which it appears "); - Assert.True(NS_TestClass_alias_14.main.testMethod()); + Assert.IsTrue(NS_TestClass_alias_14.main.testMethod()); } [TestMethod] @@ -247,7 +247,7 @@ public void NS_direct_01_Test() { OutputHelper.WriteLine("Section 9.3.2 Using namespace directives "); OutputHelper.WriteLine("The members of a namespace can be accessed directly post using "); - Assert.True(NS_TestClass_direct_01.main.testMethod()); + Assert.IsTrue(NS_TestClass_direct_01.main.testMethod()); } [TestMethod] @@ -255,7 +255,7 @@ public void NS_direct_02_Test() { OutputHelper.WriteLine("Section 9.3.2 Using namespace directives "); OutputHelper.WriteLine("A newly declared class will hide a class (with the same name) brought in with a using directive"); - Assert.True(NS_TestClass_direct_02.main.testMethod()); + Assert.IsTrue(NS_TestClass_direct_02.main.testMethod()); } [TestMethod] @@ -263,7 +263,7 @@ public void NS_direct_03_Test() { OutputHelper.WriteLine("Section 9.3.2 Using namespace directives "); OutputHelper.WriteLine("Names imported by using-namespace-directive are hidden by same-named members "); - Assert.True(NS_TestClass_direct_03.main.testMethod()); + Assert.IsTrue(NS_TestClass_direct_03.main.testMethod()); } [TestMethod] @@ -271,7 +271,7 @@ public void NS_direct_05_Test() { OutputHelper.WriteLine("Section 9.3.2 Using namespace directives "); OutputHelper.WriteLine("Ambiguous reference is overridden by using alias statement"); - Assert.True(NS_TestClass_direct_05.main.testMethod()); + Assert.IsTrue(NS_TestClass_direct_05.main.testMethod()); } [TestMethod] @@ -279,7 +279,7 @@ public void NS_typedecl_01_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Ambiguous reference is overridden by using alias statement"); - Assert.True(NS_TestClass_typedecl_01.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_01.testMethod()); } [TestMethod] @@ -287,7 +287,7 @@ public void NS_typedecl_06_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Declaring a class member as public is okay"); - Assert.True(NS_TestClass_typedecl_06.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_06.testMethod()); } [TestMethod] @@ -295,7 +295,7 @@ public void NS_typedecl_07_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Declaring a class member as protected internal is okay"); - Assert.True(NS_TestClass_typedecl_07.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_07.testMethod()); } [TestMethod] @@ -303,7 +303,7 @@ public void NS_typedecl_08_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Declaring a class member as protected is okay"); - Assert.True(NS_TestClass_typedecl_08.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_08.testMethod()); } [TestMethod] @@ -311,7 +311,7 @@ public void NS_typedecl_09_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Declaring a class member as internal is okay"); - Assert.True(NS_TestClass_typedecl_09.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_09.testMethod()); } [TestMethod] @@ -319,7 +319,7 @@ public void NS_typedecl_10_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Declaring a class member as private is okay"); - Assert.True(NS_TestClass_typedecl_10.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_10.testMethod()); } [TestMethod] @@ -327,7 +327,7 @@ public void NS_typedecl_11_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Declaring a struct member as public is okay"); - Assert.True(NS_TestClass_typedecl_11.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_11.testMethod()); } [TestMethod] @@ -335,7 +335,7 @@ public void NS_typedecl_12_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Declaring a struct member as internal is okay"); - Assert.True(NS_TestClass_typedecl_12.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_12.testMethod()); } [TestMethod] @@ -343,7 +343,7 @@ public void NS_typedecl_13_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Declaring a struct member as private is okay"); - Assert.True(NS_TestClass_typedecl_13.testMethod()); + Assert.IsTrue(NS_TestClass_typedecl_13.testMethod()); } [TestMethod] @@ -351,7 +351,7 @@ public void NS_validaccess_01_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Verify all valid accessibility levels for class declarations are allowed"); - Assert.True(NS_TestClass_validaccess_01.testMethod()); + Assert.IsTrue(NS_TestClass_validaccess_01.testMethod()); } [TestMethod] @@ -359,7 +359,7 @@ public void NS_validaccess_02_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Verify all valid accessibility levels for struct declarations are allowed"); - Assert.True(NS_TestClass_validaccess_02.testMethod()); + Assert.IsTrue(NS_TestClass_validaccess_02.testMethod()); } [TestMethod] @@ -367,7 +367,7 @@ public void NS_validaccess_03_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Verify all valid accessibility levels for interface declarations are allowed"); - Assert.True(NS_TestClass_validaccess_03.testMethod()); + Assert.IsTrue(NS_TestClass_validaccess_03.testMethod()); } [TestMethod] @@ -375,7 +375,7 @@ public void NS_validaccess_04_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Verify all valid accessibility levels for enum declarations are allowed"); - Assert.True(NS_TestClass_validaccess_04.testMethod()); + Assert.IsTrue(NS_TestClass_validaccess_04.testMethod()); } [TestMethod] @@ -383,14 +383,14 @@ public void NS_validaccess_05_Test() { OutputHelper.WriteLine("Section 9.5 Type declarations "); OutputHelper.WriteLine("Verify all valid accessibility levels for delegate declarations are allowed"); - Assert.True(NS_TestClass_validaccess_05.testMethod()); + Assert.IsTrue(NS_TestClass_validaccess_05.testMethod()); } [TestMethod] public void NS_contexts_025_Test() { OutputHelper.WriteLine("Verify that you can use the qualifier in a cref attribute of xml docs tag"); - Assert.True(NS_TestClass_contexts_025.Test.testMethod()); + Assert.IsTrue(NS_TestClass_contexts_025.Test.testMethod()); } diff --git a/Tests/NFUnitTestRecords/NFUnitTestRecords.nfproj b/Tests/NFUnitTestRecords/NFUnitTestRecords.nfproj index 7075f43d..6dcffc95 100644 --- a/Tests/NFUnitTestRecords/NFUnitTestRecords.nfproj +++ b/Tests/NFUnitTestRecords/NFUnitTestRecords.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestStatementsTests/NFUnitTestStatements.nfproj b/Tests/NFUnitTestStatementsTests/NFUnitTestStatements.nfproj index d368a6ed..30c4e309 100644 --- a/Tests/NFUnitTestStatementsTests/NFUnitTestStatements.nfproj +++ b/Tests/NFUnitTestStatementsTests/NFUnitTestStatements.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestStatementsTests/UnitTestStatementTests.cs b/Tests/NFUnitTestStatementsTests/UnitTestStatementTests.cs index d43d74a1..540e778d 100644 --- a/Tests/NFUnitTestStatementsTests/UnitTestStatementTests.cs +++ b/Tests/NFUnitTestStatementsTests/UnitTestStatementTests.cs @@ -12,7 +12,7 @@ public void Statements_Label_001_Test() { OutputHelper.WriteLine("Label_001.sc"); OutputHelper.WriteLine("Make sure labels can be declared"); - Assert.True(Statements_TestClass_Label_001.testMethod()); + Assert.IsTrue(Statements_TestClass_Label_001.testMethod()); } [TestMethod] @@ -20,7 +20,7 @@ public void Statements_Label_002_Test() { OutputHelper.WriteLine("Label_002.sc"); OutputHelper.WriteLine("Make sure labels can be referenced. Assumes 'goto'"); - Assert.True(Statements_TestClass_Label_002.testMethod()); + Assert.IsTrue(Statements_TestClass_Label_002.testMethod()); } [TestMethod] @@ -28,7 +28,7 @@ public void Statements_Label_004_Test() { OutputHelper.WriteLine("Label_004.sc"); OutputHelper.WriteLine("Make sure labels can be associated with an empty statement"); - Assert.True(Statements_TestClass_Label_004.testMethod()); + Assert.IsTrue(Statements_TestClass_Label_004.testMethod()); } [TestMethod] @@ -36,7 +36,7 @@ public void Statements_Decl_001_Test() { OutputHelper.WriteLine("Decl_001.sc"); OutputHelper.WriteLine("Declare a local variable of an intrinsic type"); - Assert.True(Statements_TestClass_Decl_001.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_001.testMethod()); } [TestMethod] @@ -44,7 +44,7 @@ public void Statements_Decl_002_Test() { OutputHelper.WriteLine("Decl_002.sc"); OutputHelper.WriteLine("Declare a local variable of an intrinsic type and initialize it"); - Assert.True(Statements_TestClass_Decl_002.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_002.testMethod()); } [TestMethod] @@ -53,7 +53,7 @@ public void Statements_Decl_003_Test() OutputHelper.WriteLine("Decl_003.sc"); OutputHelper.WriteLine("Declare a local variable of an intrinsic type and initialize it"); OutputHelper.WriteLine("with an expression."); - Assert.True(Statements_TestClass_Decl_003.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_003.testMethod()); } [TestMethod] @@ -61,7 +61,7 @@ public void Statements_Decl_004_Test() { OutputHelper.WriteLine("Decl_004.sc"); OutputHelper.WriteLine("Declare a local variable of an external object type"); - Assert.True(Statements_TestClass_Decl_004.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_004.testMethod()); } [TestMethod] @@ -69,7 +69,7 @@ public void Statements_Decl_007_Test() { OutputHelper.WriteLine("Decl_007.sc"); OutputHelper.WriteLine("Declare a series of local variables of an intrinsic type with commas"); - Assert.True(Statements_TestClass_Decl_007.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_007.testMethod()); } [TestMethod] @@ -78,7 +78,7 @@ public void Statements_Decl_009_Test() OutputHelper.WriteLine("Decl_009.sc"); OutputHelper.WriteLine("Declare a series of local variables of an intrinsic type with commas and"); OutputHelper.WriteLine("initial assignments."); - Assert.True(Statements_TestClass_Decl_009.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_009.testMethod()); } [TestMethod] @@ -86,7 +86,7 @@ public void Statements_Decl_010_Test() { OutputHelper.WriteLine("Decl_010.sc"); OutputHelper.WriteLine("Declare a local variable of an intrinsic type as an array"); - Assert.True(Statements_TestClass_Decl_010.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_010.testMethod()); } [TestMethod] @@ -94,7 +94,7 @@ public void Statements_Decl_012_Test() { OutputHelper.WriteLine("Decl_012.sc"); OutputHelper.WriteLine("Declare a local variable of an intrinsic type as an array, allocate and reference it."); - Assert.True(Statements_TestClass_Decl_012.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_012.testMethod()); } [TestMethod] @@ -102,7 +102,7 @@ public void Statements_Decl_014_Test() { OutputHelper.WriteLine("Decl_014.sc"); OutputHelper.WriteLine("Declare a local variable of an intrinsic type as an initialized array"); - Assert.True(Statements_TestClass_Decl_014.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_014.testMethod()); } [TestMethod] @@ -111,7 +111,7 @@ public void Statements_Decl_016_Test() OutputHelper.WriteLine("Decl_016.sc"); OutputHelper.WriteLine("Correctly declare a local variable of a type that has no default constructor"); OutputHelper.WriteLine("as an array."); - Assert.True(Statements_TestClass_Decl_016.testMethod()); + Assert.IsTrue(Statements_TestClass_Decl_016.testMethod()); } [TestMethod] @@ -122,7 +122,7 @@ public void Statements_Block_001_Test() OutputHelper.WriteLine("are so fundamental, that most can be tested in one pass."); OutputHelper.WriteLine("Note that by the nature of this code, many warnings"); OutputHelper.WriteLine("could/should be generated about items that are never reached."); - Assert.True(Statements_TestClass_Block_001.testMethod()); + Assert.IsTrue(Statements_TestClass_Block_001.testMethod()); } [TestMethod] @@ -133,7 +133,7 @@ public void Statements_Empty_001_Test() OutputHelper.WriteLine("are so fundamental, that most can be tested in one pass."); OutputHelper.WriteLine("Note that by the nature of this code, many warnings"); OutputHelper.WriteLine("could/should be generated about items that are never reached."); - Assert.True(Statements_TestClass_Empty_001.testMethod()); + Assert.IsTrue(Statements_TestClass_Empty_001.testMethod()); } [TestMethod] @@ -141,7 +141,7 @@ public void Statements_Expr_002_Test() { OutputHelper.WriteLine("Expr_002.sc"); OutputHelper.WriteLine("Use an expression with side effects."); - Assert.True(Statements_TestClass_Expr_002.testMethod()); + Assert.IsTrue(Statements_TestClass_Expr_002.testMethod()); } [TestMethod] @@ -149,7 +149,7 @@ public void Statements_Expr_003_Test() { OutputHelper.WriteLine("Expr_003.sc"); OutputHelper.WriteLine("Use an expression with side effects and multiple l-values."); - Assert.True(Statements_TestClass_Expr_003.testMethod()); + Assert.IsTrue(Statements_TestClass_Expr_003.testMethod()); } [TestMethod] @@ -157,14 +157,14 @@ public void Statements_Expr_004_Test() { OutputHelper.WriteLine("Expr_004.sc"); OutputHelper.WriteLine("Run a quick test of common operator/assignment combos"); - Assert.True(Statements_TestClass_Expr_004.testMethod()); + Assert.IsTrue(Statements_TestClass_Expr_004.testMethod()); } [TestMethod] public void Statements_Expr_006_Test() { OutputHelper.WriteLine(" complex assignment"); - Assert.True(Statements_TestClass_Expr_006.testMethod()); + Assert.IsTrue(Statements_TestClass_Expr_006.testMethod()); } [TestMethod] @@ -172,7 +172,7 @@ public void Statements_if_001_Test() { OutputHelper.WriteLine("if_001.sc"); OutputHelper.WriteLine("Simple boolean if with a single statement"); - Assert.True(Statements_TestClass_if_001.testMethod()); + Assert.IsTrue(Statements_TestClass_if_001.testMethod()); } [TestMethod] @@ -180,7 +180,7 @@ public void Statements_if_003_Test() { OutputHelper.WriteLine("if_003.sc"); OutputHelper.WriteLine("Simple boolean if with a block statement"); - Assert.True(Statements_TestClass_if_003.testMethod()); + Assert.IsTrue(Statements_TestClass_if_003.testMethod()); } [TestMethod] @@ -188,7 +188,7 @@ public void Statements_if_005_Test() { OutputHelper.WriteLine("if_005.sc"); OutputHelper.WriteLine("Simple boolean if with a single statement and else"); - Assert.True(Statements_TestClass_if_005.testMethod()); + Assert.IsTrue(Statements_TestClass_if_005.testMethod()); } [TestMethod] @@ -196,7 +196,7 @@ public void Statements_if_007_Test() { OutputHelper.WriteLine("if_007.sc"); OutputHelper.WriteLine("Simple boolean if with a block statement"); - Assert.True(Statements_TestClass_if_007.testMethod()); + Assert.IsTrue(Statements_TestClass_if_007.testMethod()); } [TestMethod] @@ -205,7 +205,7 @@ public void Statements_if_009_Test() OutputHelper.WriteLine("if_009.sc"); OutputHelper.WriteLine("Nest ifs with elses without blocks. Statements_TestClass_? that the 'else' ambiguity from"); OutputHelper.WriteLine("C/C++ is handled the same way (else bound to closest if)"); - Assert.True(Statements_TestClass_if_009.testMethod()); + Assert.IsTrue(Statements_TestClass_if_009.testMethod()); } [TestMethod] @@ -213,7 +213,7 @@ public void Statements_switch_001_Test() { OutputHelper.WriteLine("switch_001.sc"); OutputHelper.WriteLine("Empty switch"); - Assert.True(Statements_TestClass_switch_001.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_001.testMethod()); } [TestMethod] @@ -221,7 +221,7 @@ public void Statements_switch_002_Test() { OutputHelper.WriteLine("switch_002.sc"); OutputHelper.WriteLine("Default only switch"); - Assert.True(Statements_TestClass_switch_002.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_002.testMethod()); } [TestMethod] @@ -229,7 +229,7 @@ public void Statements_switch_003_Test() { OutputHelper.WriteLine("switch_003.sc"); OutputHelper.WriteLine("Switch with single case without break - no default"); - Assert.True(Statements_TestClass_switch_003.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_003.testMethod()); } [TestMethod] @@ -237,7 +237,7 @@ public void Statements_switch_004_Test() { OutputHelper.WriteLine("switch_004.sc"); OutputHelper.WriteLine("Switch with one case, using break"); - Assert.True(Statements_TestClass_switch_004.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_004.testMethod()); } [TestMethod] @@ -245,7 +245,7 @@ public void Statements_switch_005_Test() { OutputHelper.WriteLine("switch_005.sc"); OutputHelper.WriteLine("Switch with two cases, using break"); - Assert.True(Statements_TestClass_switch_005.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_005.testMethod()); } [TestMethod] @@ -253,7 +253,7 @@ public void Statements_switch_006_Test() { OutputHelper.WriteLine("switch_006.sc"); OutputHelper.WriteLine("Switch with one case and a default"); - Assert.True(Statements_TestClass_switch_006.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_006.testMethod()); } [TestMethod] @@ -261,7 +261,7 @@ public void Statements_switch_007_Test() { OutputHelper.WriteLine("switch_007.sc"); OutputHelper.WriteLine("Switch with two cases and a default"); - Assert.True(Statements_TestClass_switch_007.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_007.testMethod()); } [TestMethod] @@ -269,7 +269,7 @@ public void Statements_switch_010_Test() { OutputHelper.WriteLine("switch_010.sc"); OutputHelper.WriteLine("Switch with a const variable in a case"); - Assert.True(Statements_TestClass_switch_010.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_010.testMethod()); } [TestMethod] @@ -277,7 +277,7 @@ public void Statements_switch_012_Test() { OutputHelper.WriteLine("switch_012.sc"); OutputHelper.WriteLine("Multiple case labels"); - Assert.True(Statements_TestClass_switch_012.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_012.testMethod()); } [TestMethod] @@ -286,7 +286,7 @@ public void Statements_switch_013_Test() OutputHelper.WriteLine("switch_013.sc"); OutputHelper.WriteLine("test goto all over"); OutputHelper.WriteLine("Expected Output"); - Assert.True(Statements_TestClass_switch_013.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_013.testMethod()); } [TestMethod] @@ -294,7 +294,7 @@ public void Statements_switch_015_Test() { OutputHelper.WriteLine("switch_015.sc"); OutputHelper.WriteLine("Run a switch over a specific type: byte"); - Assert.True(Statements_TestClass_switch_015.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_015.testMethod()); } [TestMethod] @@ -302,7 +302,7 @@ public void Statements_switch_016_Test() { OutputHelper.WriteLine("switch_016.sc"); OutputHelper.WriteLine("Run a switch over a specific type: char"); - Assert.True(Statements_TestClass_switch_016.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_016.testMethod()); } [TestMethod] @@ -310,7 +310,7 @@ public void Statements_switch_017_Test() { OutputHelper.WriteLine("switch_017.sc"); OutputHelper.WriteLine("Run a switch over a specific type: short"); - Assert.True(Statements_TestClass_switch_017.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_017.testMethod()); } [TestMethod] @@ -318,7 +318,7 @@ public void Statements_switch_018_Test() { OutputHelper.WriteLine("switch_018.sc"); OutputHelper.WriteLine("Run a switch over a specific type: int"); - Assert.True(Statements_TestClass_switch_018.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_018.testMethod()); } [TestMethod] @@ -326,7 +326,7 @@ public void Statements_switch_019_Test() { OutputHelper.WriteLine("switch_019.sc"); OutputHelper.WriteLine("Run a switch over a specific type: long"); - Assert.True(Statements_TestClass_switch_019.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_019.testMethod()); } [TestMethod] @@ -334,42 +334,42 @@ public void Statements_switch_023_Test() { OutputHelper.WriteLine("switch_023.sc"); OutputHelper.WriteLine("Run a switch over a specific type: enum"); - Assert.True(Statements_TestClass_switch_023.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_023.testMethod()); } [TestMethod] public void Statements_switch_030_Test() { OutputHelper.WriteLine(" switch on int variable, float case"); - Assert.True(Statements_TestClass_switch_030.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_030.testMethod()); } [TestMethod] public void Statements_switch_031_Test() { OutputHelper.WriteLine(" switch with holes in range"); - Assert.True(Statements_TestClass_switch_031.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_031.testMethod()); } [TestMethod] public void Statements_switch_032_Test() { OutputHelper.WriteLine(" switch: default case at top"); - Assert.True(Statements_TestClass_switch_032.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_032.testMethod()); } [TestMethod] public void Statements_switch_033_Test() { OutputHelper.WriteLine(" switch: default case in middle"); - Assert.True(Statements_TestClass_switch_033.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_033.testMethod()); } [TestMethod] public void Statements_switch_034_Test() { OutputHelper.WriteLine(" switch: default case in middle"); - Assert.True(Statements_TestClass_switch_034.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_034.testMethod()); } [TestMethod] @@ -379,7 +379,7 @@ public void Statements_switch_035_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_035.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_035.testMethod()); } [TestMethod] @@ -389,7 +389,7 @@ public void Statements_switch_036_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_036.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_036.testMethod()); } [TestMethod] @@ -399,7 +399,7 @@ public void Statements_switch_037_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_037.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_037.testMethod()); } [TestMethod] @@ -409,7 +409,7 @@ public void Statements_switch_038_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_038.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_038.testMethod()); } [TestMethod] @@ -419,7 +419,7 @@ public void Statements_switch_039_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_039.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_039.testMethod()); } [TestMethod] @@ -429,7 +429,7 @@ public void Statements_switch_040_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_040.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_040.testMethod()); } [TestMethod] @@ -439,7 +439,7 @@ public void Statements_switch_041_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_041.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_041.testMethod()); } [TestMethod] @@ -449,7 +449,7 @@ public void Statements_switch_042_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_042.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_042.testMethod()); } [TestMethod] @@ -459,7 +459,7 @@ public void Statements_switch_044_Test() OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - Assert.True(Statements_TestClass_switch_044.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_044.testMethod()); } [TestMethod] @@ -470,21 +470,21 @@ public void Statements_switch_047_Test() OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); OutputHelper.WriteLine("Ensure error is emmited on when more than one implicit conversion to an acceptable governing type is defined"); - Assert.True(Statements_TestClass_switch_047.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_047.testMethod()); } [TestMethod] public void Statements_switch_049_Test() { OutputHelper.WriteLine("warning CS1522: Empty switch block"); - Assert.True(Statements_TestClass_switch_049.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_049.testMethod()); } [TestMethod] public void Statements_switch_string_001_Test() { OutputHelper.WriteLine(" switch on string: null"); - Assert.True(Statements_TestClass_switch_string_001.testMethod()); + Assert.IsTrue(Statements_TestClass_switch_string_001.testMethod()); } [TestMethod] @@ -492,7 +492,7 @@ public void Statements_dowhile_001_Test() { OutputHelper.WriteLine("dowhile_001.sc"); OutputHelper.WriteLine("do/while with a single statement"); - Assert.True(Statements_TestClass_dowhile_001.testMethod()); + Assert.IsTrue(Statements_TestClass_dowhile_001.testMethod()); } [TestMethod] @@ -500,7 +500,7 @@ public void Statements_dowhile_002_Test() { OutputHelper.WriteLine("dowhile_002.sc"); OutputHelper.WriteLine("do/while with a compound statement"); - Assert.True(Statements_TestClass_dowhile_002.testMethod()); + Assert.IsTrue(Statements_TestClass_dowhile_002.testMethod()); } [TestMethod] @@ -508,7 +508,7 @@ public void Statements_dowhile_003_Test() { OutputHelper.WriteLine("dowhile_003.sc"); OutputHelper.WriteLine("verify known false condition executes only once with single statement"); - Assert.True(Statements_TestClass_dowhile_003.testMethod()); + Assert.IsTrue(Statements_TestClass_dowhile_003.testMethod()); } [TestMethod] @@ -516,7 +516,7 @@ public void Statements_dowhile_004_Test() { OutputHelper.WriteLine("dowhile_004.sc"); OutputHelper.WriteLine("verify known true condition executes with single statement"); - Assert.True(Statements_TestClass_dowhile_004.testMethod()); + Assert.IsTrue(Statements_TestClass_dowhile_004.testMethod()); } [TestMethod] @@ -524,7 +524,7 @@ public void Statements_dowhile_005_Test() { OutputHelper.WriteLine("dowhile_005.sc"); OutputHelper.WriteLine("verify known false condition executes once with compound statements"); - Assert.True(Statements_TestClass_dowhile_005.testMethod()); + Assert.IsTrue(Statements_TestClass_dowhile_005.testMethod()); } [TestMethod] @@ -532,7 +532,7 @@ public void Statements_dowhile_006_Test() { OutputHelper.WriteLine("dowhile_006.sc"); OutputHelper.WriteLine("verify known true condition executes with compound statements"); - Assert.True(Statements_TestClass_dowhile_006.testMethod()); + Assert.IsTrue(Statements_TestClass_dowhile_006.testMethod()); } [TestMethod] @@ -540,7 +540,7 @@ public void Statements_for_001_Test() { OutputHelper.WriteLine("for_001.sc"); OutputHelper.WriteLine("empty for loop"); - Assert.True(Statements_TestClass_for_001.testMethod()); + Assert.IsTrue(Statements_TestClass_for_001.testMethod()); } [TestMethod] @@ -548,7 +548,7 @@ public void Statements_for_003_Test() { OutputHelper.WriteLine("for_003.sc"); OutputHelper.WriteLine("empty initializer in for loop"); - Assert.True(Statements_TestClass_for_003.testMethod()); + Assert.IsTrue(Statements_TestClass_for_003.testMethod()); } [TestMethod] @@ -556,7 +556,7 @@ public void Statements_for_004_Test() { OutputHelper.WriteLine("for_004.sc"); OutputHelper.WriteLine("empty iterator in for loop"); - Assert.True(Statements_TestClass_for_004.testMethod()); + Assert.IsTrue(Statements_TestClass_for_004.testMethod()); } [TestMethod] @@ -564,7 +564,7 @@ public void Statements_for_006_Test() { OutputHelper.WriteLine("for_006.sc"); OutputHelper.WriteLine("Full normal for loop"); - Assert.True(Statements_TestClass_for_006.testMethod()); + Assert.IsTrue(Statements_TestClass_for_006.testMethod()); } [TestMethod] @@ -572,7 +572,7 @@ public void Statements_for_007_Test() { OutputHelper.WriteLine("for_007.sc"); OutputHelper.WriteLine("Full normal for loop with a compound statement"); - Assert.True(Statements_TestClass_for_007.testMethod()); + Assert.IsTrue(Statements_TestClass_for_007.testMethod()); } [TestMethod] @@ -580,7 +580,7 @@ public void Statements_for_008_Test() { OutputHelper.WriteLine("for_008.sc"); OutputHelper.WriteLine("Multiple declarations in initializer"); - Assert.True(Statements_TestClass_for_008.testMethod()); + Assert.IsTrue(Statements_TestClass_for_008.testMethod()); } [TestMethod] @@ -588,7 +588,7 @@ public void Statements_for_009_Test() { OutputHelper.WriteLine("for_009.sc"); OutputHelper.WriteLine("Statements_TestClass_? statement expression lists in for initializer"); - Assert.True(Statements_TestClass_for_009.testMethod()); + Assert.IsTrue(Statements_TestClass_for_009.testMethod()); } [TestMethod] @@ -596,7 +596,7 @@ public void Statements_for_010_Test() { OutputHelper.WriteLine("for_010.sc"); OutputHelper.WriteLine("Statements_TestClass_? statement expression lists in for iterator"); - Assert.True(Statements_TestClass_for_010.testMethod()); + Assert.IsTrue(Statements_TestClass_for_010.testMethod()); } [TestMethod] @@ -604,7 +604,7 @@ public void Statements_for_011_Test() { OutputHelper.WriteLine("for_011.sc"); OutputHelper.WriteLine("Statements_TestClass_? statement expression lists in for initializer and iterator"); - Assert.True(Statements_TestClass_for_011.testMethod()); + Assert.IsTrue(Statements_TestClass_for_011.testMethod()); } [TestMethod] @@ -612,7 +612,7 @@ public void Statements_for_013_Test() { OutputHelper.WriteLine("for_013.sc"); OutputHelper.WriteLine("Verify conditional evaluates before iterator"); - Assert.True(Statements_TestClass_for_013.testMethod()); + Assert.IsTrue(Statements_TestClass_for_013.testMethod()); } [TestMethod] @@ -620,21 +620,21 @@ public void Statements_for_014_Test() { OutputHelper.WriteLine("for_014.sc"); OutputHelper.WriteLine("Verify method calls work ok in all for loop areas"); - Assert.True(Statements_TestClass_for_014.testMethod()); + Assert.IsTrue(Statements_TestClass_for_014.testMethod()); } [TestMethod] public void Statements_char_in_string_s01_Test() { OutputHelper.WriteLine("Optimization to foreach (char c in String) by treating String as a char array"); - Assert.True(Statements_TestClass_char_in_string_s01.testMethod()); + Assert.IsTrue(Statements_TestClass_char_in_string_s01.testMethod()); } [TestMethod] public void Statements_char_in_string_ex01_Test() { OutputHelper.WriteLine("Optimization to foreach (char c in String) by treating String as a char array"); - Assert.True(Statements_TestClass_char_in_string_ex01.testMethod()); + Assert.IsTrue(Statements_TestClass_char_in_string_ex01.testMethod()); } [TestMethod] @@ -642,7 +642,7 @@ public void Statements_while_001_Test() { OutputHelper.WriteLine("while_001.sc"); OutputHelper.WriteLine("while with a single statement"); - Assert.True(Statements_TestClass_while_001.testMethod()); + Assert.IsTrue(Statements_TestClass_while_001.testMethod()); } [TestMethod] @@ -650,7 +650,7 @@ public void Statements_while_002_Test() { OutputHelper.WriteLine("while_002.sc"); OutputHelper.WriteLine("while with a compound statement"); - Assert.True(Statements_TestClass_while_002.testMethod()); + Assert.IsTrue(Statements_TestClass_while_002.testMethod()); } [TestMethod] @@ -658,7 +658,7 @@ public void Statements_while_003_Test() { OutputHelper.WriteLine("while_003.sc"); OutputHelper.WriteLine("verify known false condition doesn't execute with single statement"); - Assert.True(Statements_TestClass_while_003.testMethod()); + Assert.IsTrue(Statements_TestClass_while_003.testMethod()); } [TestMethod] @@ -666,7 +666,7 @@ public void Statements_while_004_Test() { OutputHelper.WriteLine("while_004.sc"); OutputHelper.WriteLine("verify known true condition executes with single statement"); - Assert.True(Statements_TestClass_while_004.testMethod()); + Assert.IsTrue(Statements_TestClass_while_004.testMethod()); } [TestMethod] @@ -674,7 +674,7 @@ public void Statements_while_005_Test() { OutputHelper.WriteLine("while_005.sc"); OutputHelper.WriteLine("verify known false condition doesn't execute with compound statements"); - Assert.True(Statements_TestClass_while_005.testMethod()); + Assert.IsTrue(Statements_TestClass_while_005.testMethod()); } [TestMethod] @@ -682,7 +682,7 @@ public void Statements_while_006_Test() { OutputHelper.WriteLine("while_006.sc"); OutputHelper.WriteLine("verify known true condition executes with compound statements"); - Assert.True(Statements_TestClass_while_006.testMethod()); + Assert.IsTrue(Statements_TestClass_while_006.testMethod()); } [TestMethod] @@ -690,7 +690,7 @@ public void Statements_break_001_Test() { OutputHelper.WriteLine("break_001.sc"); OutputHelper.WriteLine("Make sure break works in all basic single statement loops"); - Assert.True(Statements_TestClass_break_001.testMethod()); + Assert.IsTrue(Statements_TestClass_break_001.testMethod()); } [TestMethod] @@ -698,7 +698,7 @@ public void Statements_break_002_Test() { OutputHelper.WriteLine("break_002.sc"); OutputHelper.WriteLine("Make sure break works in all basic compound statement loops"); - Assert.True(Statements_TestClass_break_002.testMethod()); + Assert.IsTrue(Statements_TestClass_break_002.testMethod()); } [TestMethod] @@ -706,7 +706,7 @@ public void Statements_break_003_Test() { OutputHelper.WriteLine("break_003.sc"); OutputHelper.WriteLine("Make sure break optional on end of switch"); - Assert.True(Statements_TestClass_break_003.testMethod()); + Assert.IsTrue(Statements_TestClass_break_003.testMethod()); } [TestMethod] @@ -714,7 +714,7 @@ public void Statements_break_006_Test() { OutputHelper.WriteLine("break_006.sc"); OutputHelper.WriteLine("break in an if successfully breaks loop"); - Assert.True(Statements_TestClass_break_006.testMethod()); + Assert.IsTrue(Statements_TestClass_break_006.testMethod()); } [TestMethod] @@ -722,7 +722,7 @@ public void Statements_break_007_Test() { OutputHelper.WriteLine("break_007.sc"); OutputHelper.WriteLine("break in a blocked if successfully breaks loop"); - Assert.True(Statements_TestClass_break_007.testMethod()); + Assert.IsTrue(Statements_TestClass_break_007.testMethod()); } [TestMethod] @@ -730,7 +730,7 @@ public void Statements_break_010_Test() { OutputHelper.WriteLine("break_010.sc"); OutputHelper.WriteLine("Make sure break correctly when nested"); - Assert.True(Statements_TestClass_break_010.testMethod()); + Assert.IsTrue(Statements_TestClass_break_010.testMethod()); } [TestMethod] @@ -738,7 +738,7 @@ public void Statements_continue_001_Test() { OutputHelper.WriteLine("continue_001.sc"); OutputHelper.WriteLine("Make sure continue works in all basic single statement loops"); - Assert.True(Statements_TestClass_continue_001.testMethod()); + Assert.IsTrue(Statements_TestClass_continue_001.testMethod()); } [TestMethod] @@ -747,7 +747,7 @@ public void Statements_continue_002_Test() OutputHelper.WriteLine("continue_002.sc"); OutputHelper.WriteLine("Make sure continue works in all basic compound statement loops"); OutputHelper.WriteLine("Expected Output"); - Assert.True(Statements_TestClass_continue_002.testMethod()); + Assert.IsTrue(Statements_TestClass_continue_002.testMethod()); } [TestMethod] @@ -755,7 +755,7 @@ public void Statements_continue_006_Test() { OutputHelper.WriteLine("continue_006.sc"); OutputHelper.WriteLine("continue in an if successfully continues loop"); - Assert.True(Statements_TestClass_continue_006.testMethod()); + Assert.IsTrue(Statements_TestClass_continue_006.testMethod()); } [TestMethod] @@ -763,7 +763,7 @@ public void Statements_continue_007_Test() { OutputHelper.WriteLine("continue_007.sc"); OutputHelper.WriteLine("continue in a block if successfully continues loop"); - Assert.True(Statements_TestClass_continue_007.testMethod()); + Assert.IsTrue(Statements_TestClass_continue_007.testMethod()); } [TestMethod] @@ -771,7 +771,7 @@ public void Statements_continue_010_Test() { OutputHelper.WriteLine("continue_010.sc"); OutputHelper.WriteLine("Make sure continue works correctly when nested"); - Assert.True(Statements_TestClass_continue_010.testMethod()); + Assert.IsTrue(Statements_TestClass_continue_010.testMethod()); } [TestMethod] @@ -779,7 +779,7 @@ public void Statements_goto_001_Test() { OutputHelper.WriteLine("goto_001.sc"); OutputHelper.WriteLine("simple goto to adjust flow control"); - Assert.True(Statements_TestClass_goto_001.testMethod()); + Assert.IsTrue(Statements_TestClass_goto_001.testMethod()); } [TestMethod] @@ -787,7 +787,7 @@ public void Statements_goto_008_Test() { OutputHelper.WriteLine("goto_008.sc"); OutputHelper.WriteLine("goto currect case"); - Assert.True(Statements_TestClass_goto_008.testMethod()); + Assert.IsTrue(Statements_TestClass_goto_008.testMethod()); } [TestMethod] @@ -796,7 +796,7 @@ public void Statements_goto_009_Test() OutputHelper.WriteLine("goto_009.sc"); OutputHelper.WriteLine("goto a different case"); OutputHelper.WriteLine("Expected Output"); - Assert.True(Statements_TestClass_goto_009.testMethod()); + Assert.IsTrue(Statements_TestClass_goto_009.testMethod()); } [TestMethod] @@ -804,7 +804,7 @@ public void Statements_goto_010_Test() { OutputHelper.WriteLine("goto_010.sc"); OutputHelper.WriteLine("goto default correctly"); - Assert.True(Statements_TestClass_goto_010.testMethod()); + Assert.IsTrue(Statements_TestClass_goto_010.testMethod()); } [TestMethod] @@ -812,21 +812,21 @@ public void Statements_goto_014_Test() { OutputHelper.WriteLine("goto_014.sc"); OutputHelper.WriteLine("simple gotos to test jumping to parent process."); - Assert.True(Statements_TestClass_goto_014.testMethod()); + Assert.IsTrue(Statements_TestClass_goto_014.testMethod()); } [TestMethod] public void Statements_goto_017_Test() { OutputHelper.WriteLine(" some gotos"); - Assert.True(Statements_TestClass_goto_017.testMethod()); + Assert.IsTrue(Statements_TestClass_goto_017.testMethod()); } [TestMethod] public void Statements_goto_018_Test() { OutputHelper.WriteLine(" try/catch/finally with goto"); - Assert.True(Statements_TestClass_goto_018.testMethod()); + Assert.IsTrue(Statements_TestClass_goto_018.testMethod()); } [TestMethod] @@ -834,7 +834,7 @@ public void Statements_return_001_Test() { OutputHelper.WriteLine("return_001.sc"); OutputHelper.WriteLine("simple void return on a void method"); - Assert.True(Statements_TestClass_return_001.testMethod()); + Assert.IsTrue(Statements_TestClass_return_001.testMethod()); } [TestMethod] @@ -842,7 +842,7 @@ public void Statements_return_004_Test() { OutputHelper.WriteLine("return_004.sc"); OutputHelper.WriteLine("simple return a normal type, assigning, and ignoring return value"); - Assert.True(Statements_TestClass_return_004.testMethod()); + Assert.IsTrue(Statements_TestClass_return_004.testMethod()); } [TestMethod] @@ -850,7 +850,7 @@ public void Statements_return_006_Test() { OutputHelper.WriteLine("return_006.sc"); OutputHelper.WriteLine("simple return a type mismatch that has an implicit conversion"); - Assert.True(Statements_TestClass_return_006.testMethod()); + Assert.IsTrue(Statements_TestClass_return_006.testMethod()); } [TestMethod] @@ -859,7 +859,7 @@ public void Statements_return_008_Test() OutputHelper.WriteLine("return_008.sc"); OutputHelper.WriteLine("simple return a type mismatch that has an explicit convertion conversion,"); OutputHelper.WriteLine("applying the cast"); - Assert.True(Statements_TestClass_return_008.testMethod()); + Assert.IsTrue(Statements_TestClass_return_008.testMethod()); } [TestMethod] @@ -867,7 +867,7 @@ public void Statements_return_009_Test() { OutputHelper.WriteLine("return_009.sc"); OutputHelper.WriteLine("return of a struct"); - Assert.True(Statements_TestClass_return_009.testMethod()); + Assert.IsTrue(Statements_TestClass_return_009.testMethod()); } [TestMethod] @@ -875,7 +875,7 @@ public void Statements_return_010_Test() { OutputHelper.WriteLine("return_010.sc"); OutputHelper.WriteLine("return of a class"); - Assert.True(Statements_TestClass_return_010.testMethod()); + Assert.IsTrue(Statements_TestClass_return_010.testMethod()); } [TestMethod] @@ -883,7 +883,7 @@ public void Statements_return_013_Test() { OutputHelper.WriteLine("return_013.sc"); OutputHelper.WriteLine("simple falloff on a void method"); - Assert.True(Statements_TestClass_return_013.testMethod()); + Assert.IsTrue(Statements_TestClass_return_013.testMethod()); } [TestMethod] @@ -891,7 +891,7 @@ public void Statements_return_014_Test() { OutputHelper.WriteLine("return_014.sc"); OutputHelper.WriteLine("verify that a 'throw' is adequate for flow control analysis of return type"); - Assert.True(Statements_TestClass_return_014.testMethod()); + Assert.IsTrue(Statements_TestClass_return_014.testMethod()); } [TestMethod] @@ -899,7 +899,7 @@ public void Statements_throw_001_Test() { OutputHelper.WriteLine("throw_001.sc"); OutputHelper.WriteLine("simple throw"); - Assert.True(Statements_TestClass_throw_001.testMethod()); + Assert.IsTrue(Statements_TestClass_throw_001.testMethod()); } [TestMethod] @@ -907,7 +907,7 @@ public void Statements_throw_005_Test() { OutputHelper.WriteLine("throw_005.sc"); OutputHelper.WriteLine("simple throw with output"); - Assert.True(Statements_TestClass_throw_005.testMethod()); + Assert.IsTrue(Statements_TestClass_throw_005.testMethod()); } [TestMethod] @@ -915,7 +915,7 @@ public void Statements_trycatch_001_Test() { OutputHelper.WriteLine("trycatch_001.sc"); OutputHelper.WriteLine("simple throw"); - Assert.True(Statements_TestClass_trycatch_001.testMethod()); + Assert.IsTrue(Statements_TestClass_trycatch_001.testMethod()); } [TestMethod] @@ -923,7 +923,7 @@ public void Statements_trycatch_006_Test() { OutputHelper.WriteLine("trycatch_006.sc"); OutputHelper.WriteLine("simple system generated System.Exception"); - Assert.True(Statements_TestClass_trycatch_006.testMethod()); + Assert.IsTrue(Statements_TestClass_trycatch_006.testMethod()); } [TestMethod] @@ -931,7 +931,7 @@ public void Statements_trycatch_007_Test() { OutputHelper.WriteLine("trycatch_007.sc"); OutputHelper.WriteLine("simple re-throw"); - Assert.True(Statements_TestClass_trycatch_007.testMethod()); + Assert.IsTrue(Statements_TestClass_trycatch_007.testMethod()); } [TestMethod] @@ -939,7 +939,7 @@ public void Statements_tryfinally_001_Test() { OutputHelper.WriteLine("tryfinally_001.sc"); OutputHelper.WriteLine("simple finally"); - Assert.True(Statements_TestClass_tryfinally_001.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_001.testMethod()); } [TestMethod] @@ -947,7 +947,7 @@ public void Statements_tryfinally_002_Test() { OutputHelper.WriteLine("tryfinally_002.sc"); OutputHelper.WriteLine("simple finally inside try/catch"); - Assert.True(Statements_TestClass_tryfinally_002.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_002.testMethod()); } [TestMethod] @@ -955,7 +955,7 @@ public void Statements_tryfinally_003_Test() { OutputHelper.WriteLine("tryfinally_003.sc"); OutputHelper.WriteLine("simple finally outside try/catch"); - Assert.True(Statements_TestClass_tryfinally_003.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_003.testMethod()); } [TestMethod] @@ -963,7 +963,7 @@ public void Statements_tryfinally_004_Test() { OutputHelper.WriteLine("tryfinally_004.sc"); OutputHelper.WriteLine("simple finally passed 'over' by a goto"); - Assert.True(Statements_TestClass_tryfinally_004.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_004.testMethod()); } [TestMethod] @@ -971,7 +971,7 @@ public void Statements_tryfinally_006_Test() { OutputHelper.WriteLine("tryfinally_006.sc"); OutputHelper.WriteLine("simple finally exited by throw"); - Assert.True(Statements_TestClass_tryfinally_006.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_006.testMethod()); } [TestMethod] @@ -979,7 +979,7 @@ public void Statements_tryfinally_007_Test() { OutputHelper.WriteLine("tryfinally_007.sc"); OutputHelper.WriteLine("simple finally exited by throw in a called method"); - Assert.True(Statements_TestClass_tryfinally_007.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_007.testMethod()); } [TestMethod] @@ -987,7 +987,7 @@ public void Statements_tryfinally_008_Test() { OutputHelper.WriteLine("tryfinally_008.sc"); OutputHelper.WriteLine("simple finally exited by return"); - Assert.True(Statements_TestClass_tryfinally_008.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_008.testMethod()); } [TestMethod] @@ -995,7 +995,7 @@ public void Statements_tryfinally_009_Test() { OutputHelper.WriteLine("tryfinally_009.sc"); OutputHelper.WriteLine("simple finally exited by continue"); - Assert.True(Statements_TestClass_tryfinally_009.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_009.testMethod()); } [TestMethod] @@ -1003,7 +1003,7 @@ public void Statements_tryfinally_010_Test() { OutputHelper.WriteLine("tryfinally_010.sc"); OutputHelper.WriteLine("simple finally exited by break"); - Assert.True(Statements_TestClass_tryfinally_010.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_010.testMethod()); } [TestMethod] @@ -1011,7 +1011,7 @@ public void Statements_tryfinally_011_Test() { OutputHelper.WriteLine("tryfinally_011.sc"); OutputHelper.WriteLine("simple finally exited by break (where break is outside try)"); - Assert.True(Statements_TestClass_tryfinally_011.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_011.testMethod()); } [TestMethod] @@ -1019,13 +1019,13 @@ public void Statements_tryfinally_012_Test() { OutputHelper.WriteLine("tryfinally_012.sc"); OutputHelper.WriteLine("simple finally exited by system System.Exception"); - Assert.True(Statements_TestClass_tryfinally_012.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_012.testMethod()); } [TestMethod] public void Statements_tryfinally_013_Test() { - Assert.True(Statements_TestClass_tryfinally_013.testMethod()); + Assert.IsTrue(Statements_TestClass_tryfinally_013.testMethod()); } [TestMethod] @@ -1034,7 +1034,7 @@ public void Statements_Using_001_Test() OutputHelper.WriteLine("using_001.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Cast a class to IDisposable explicitly, use that in the using statement. (1.a)"); - Assert.True(Statements_TestClass_Using_001.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_001.testMethod()); } [TestMethod] @@ -1043,7 +1043,7 @@ public void Statements_Using_002_Test() OutputHelper.WriteLine("using_002.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Use a class directly in using (1.b)"); - Assert.True(Statements_TestClass_Using_002.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_002.testMethod()); } [TestMethod] @@ -1052,7 +1052,7 @@ public void Statements_Using_003_Test() OutputHelper.WriteLine("using_003.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Creation of class as part of using statement (1.c)"); - Assert.True(Statements_TestClass_Using_003.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_003.testMethod()); } [TestMethod] @@ -1061,7 +1061,7 @@ public void Statements_Using_005_Test() OutputHelper.WriteLine("using_005.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("A class that explicitly implements IDisposable. (1.e)"); - Assert.True(Statements_TestClass_Using_005.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_005.testMethod()); } [TestMethod] @@ -1070,7 +1070,7 @@ public void Statements_Using_009_Test() OutputHelper.WriteLine("using_009.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Statements_TestClass_? the behavior if the used variable is nulled-out in the using block (4)"); - Assert.True(Statements_TestClass_Using_009.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_009.testMethod()); } [TestMethod] @@ -1079,7 +1079,7 @@ public void Statements_Using_010_Test() OutputHelper.WriteLine("using_010.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Dispose() called during normal exit (5.a)"); - Assert.True(Statements_TestClass_Using_010.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_010.testMethod()); } [TestMethod] @@ -1089,7 +1089,7 @@ public void Statements_Using_011_Test() OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Dispose() called after throw (5.b)"); OutputHelper.WriteLine("Expected Output"); - Assert.True(Statements_TestClass_Using_011.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_011.testMethod()); } [TestMethod] @@ -1098,7 +1098,7 @@ public void Statements_Using_012_Test() OutputHelper.WriteLine("using_012.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Dispose() called for two objects during normal exit. (5.c)"); - Assert.True(Statements_TestClass_Using_012.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_012.testMethod()); } [TestMethod] @@ -1107,7 +1107,7 @@ public void Statements_Using_013_Test() OutputHelper.WriteLine("using_013.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Dispose() called for first objects with System.Exception thrown before second block. (5.d)"); - Assert.True(Statements_TestClass_Using_013.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_013.testMethod()); } [TestMethod] @@ -1116,7 +1116,7 @@ public void Statements_Using_014_Test() OutputHelper.WriteLine("using_014.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Dispose() called for first objects with System.Exception thrown after second block. (5.e)"); - Assert.True(Statements_TestClass_Using_014.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_014.testMethod()); } [TestMethod] @@ -1125,7 +1125,7 @@ public void Statements_Using_015_Test() OutputHelper.WriteLine("using_015.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Dispose() called for both objects when System.Exception thrown inside second block. (5.f)"); - Assert.True(Statements_TestClass_Using_015.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_015.testMethod()); } [TestMethod] @@ -1134,7 +1134,7 @@ public void Statements_Using_017_Test() OutputHelper.WriteLine("using_017.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Dispose() called for both objects when System.Exception thrown in compound case (5.h)"); - Assert.True(Statements_TestClass_Using_017.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_017.testMethod()); } [TestMethod] @@ -1143,49 +1143,49 @@ public void Statements_Using_018_Test() OutputHelper.WriteLine("using_018.cs"); OutputHelper.WriteLine("Statements_TestClass_? the using statement."); OutputHelper.WriteLine("Dispose() called for both objects in compound using. (5.g)"); - Assert.True(Statements_TestClass_Using_018.testMethod()); + Assert.IsTrue(Statements_TestClass_Using_018.testMethod()); } [TestMethod] public void Statements_lock001_Test() { OutputHelper.WriteLine("The expression of a lock statement must denote a value of a reference-type"); - Assert.True(Statements_TestClass_lock001.testMethod()); + Assert.IsTrue(Statements_TestClass_lock001.testMethod()); } [TestMethod] public void Statements_lock003_Test() { OutputHelper.WriteLine("The System.Type object of a class can conveniently be used as the mutual-exclusion lock for static methods of the class"); - Assert.True(Statements_TestClass_lock003.testMethod()); + Assert.IsTrue(Statements_TestClass_lock003.testMethod()); } [TestMethod] public void Statements_lock004_Test() { OutputHelper.WriteLine("possible mistaken null statement when semi-column appears directly after lock()"); - Assert.True(Statements_TestClass_lock004.testMethod()); + Assert.IsTrue(Statements_TestClass_lock004.testMethod()); } [TestMethod] public void Statements_lock005_Test() { OutputHelper.WriteLine("this as the lock expression in a reference type"); - Assert.True(Statements_TestClass_lock005.testMethod()); + Assert.IsTrue(Statements_TestClass_lock005.testMethod()); } [TestMethod] public void Statements_lock007_Test() { OutputHelper.WriteLine("nested lock statements"); - Assert.True(Statements_TestClass_lock007.testMethod()); + Assert.IsTrue(Statements_TestClass_lock007.testMethod()); } [TestMethod] public void Statements_enum_002_Test() { OutputHelper.WriteLine(" enum: comparing constant casted to an enum type to a variable"); - Assert.True(Statements_TestClass_enum_002.testMethod()); + Assert.IsTrue(Statements_TestClass_enum_002.testMethod()); } public class Res1 : IDisposable diff --git a/Tests/NFUnitTestStruct/NFUnitTestStruct.nfproj b/Tests/NFUnitTestStruct/NFUnitTestStruct.nfproj index 72738474..952c14e3 100644 --- a/Tests/NFUnitTestStruct/NFUnitTestStruct.nfproj +++ b/Tests/NFUnitTestStruct/NFUnitTestStruct.nfproj @@ -34,7 +34,7 @@ - + @@ -44,6 +44,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestStruct/UnitTestStructs.cs b/Tests/NFUnitTestStruct/UnitTestStructs.cs index 7ba759d6..54665ed2 100644 --- a/Tests/NFUnitTestStruct/UnitTestStructs.cs +++ b/Tests/NFUnitTestStruct/UnitTestStructs.cs @@ -17,25 +17,25 @@ public class UnitTestStructs public void Structs01_Test() { StructsTestClass_01_Notes.Note(); - Assert.True(StructsTestClass_01.testMethod()); + Assert.IsTrue(StructsTestClass_01.testMethod()); } [TestMethod] public void Structs04_Test() { StructsTestClass_04_Notes.Note(); - Assert.True(StructsTestClass_04.testMethod()); + Assert.IsTrue(StructsTestClass_04.testMethod()); } [TestMethod] public void Structs11_Test() { StructsTestClass_11_Notes.Note(); - Assert.True(StructsTestClass_11.testMethod()); + Assert.IsTrue(StructsTestClass_11.testMethod()); } [TestMethod] public void Structs12_Test() { StructsTestClass_12_Notes.Note(); - Assert.True(StructsTestClass_12.testMethod()); + Assert.IsTrue(StructsTestClass_12.testMethod()); } [TestMethod] public void Structs13_Test() @@ -43,139 +43,139 @@ public void Structs13_Test() OutputHelper.WriteLine("Expected failure, see 16852 for more details"); StructsTestClass_13_Notes.Note(); - Assert.True(StructsTestClass_13.testMethod()); + Assert.IsTrue(StructsTestClass_13.testMethod()); } [TestMethod] public void Structs14_Test() { StructsTestClass_14_Notes.Note(); - Assert.True(StructsTestClass_14.testMethod()); + Assert.IsTrue(StructsTestClass_14.testMethod()); } [TestMethod] public void Structs15_Test() { StructsTestClass_15_Notes.Note(); - Assert.True(StructsTestClass_15.testMethod()); + Assert.IsTrue(StructsTestClass_15.testMethod()); } [TestMethod] public void Structs19_Test() { StructsTestClass_19_Notes.Note(); - Assert.True(StructsTestClass_19.testMethod()); + Assert.IsTrue(StructsTestClass_19.testMethod()); } [TestMethod] public void Structs21_Test() { StructsTestClass_21_Notes.Note(); - Assert.True(StructsTestClass_21.testMethod()); + Assert.IsTrue(StructsTestClass_21.testMethod()); } [TestMethod] public void Structs23_Test() { StructsTestClass_23_Notes.Note(); - Assert.True(StructsTestClass_23.testMethod()); + Assert.IsTrue(StructsTestClass_23.testMethod()); } [TestMethod] public void Structs24_Test() { StructsTestClass_24_Notes.Note(); - Assert.True(StructsTestClass_24.testMethod()); + Assert.IsTrue(StructsTestClass_24.testMethod()); } [TestMethod] public void Structs26_Test() { StructsTestClass_26_Notes.Note(); - Assert.True(StructsTestClass_26.testMethod()); + Assert.IsTrue(StructsTestClass_26.testMethod()); } [TestMethod] public void Structs28_Test() { StructsTestClass_28_Notes.Note(); - Assert.True(StructsTestClass_28.testMethod()); + Assert.IsTrue(StructsTestClass_28.testMethod()); } [TestMethod] public void Structs29_Test() { StructsTestClass_29_Notes.Note(); - Assert.True(StructsTestClass_29.testMethod()); + Assert.IsTrue(StructsTestClass_29.testMethod()); } [TestMethod] public void Structs32_Test() { StructsTestClass_32_Notes.Note(); - Assert.True(StructsTestClass_32.testMethod()); + Assert.IsTrue(StructsTestClass_32.testMethod()); } [TestMethod] public void Structs33_Test() { StructsTestClass_33_Notes.Note(); - Assert.True(StructsTestClass_33.testMethod()); + Assert.IsTrue(StructsTestClass_33.testMethod()); } [TestMethod] public void Structs34_Test() { StructsTestClass_34_Notes.Note(); - Assert.True(StructsTestClass_34.testMethod()); + Assert.IsTrue(StructsTestClass_34.testMethod()); } [TestMethod] public void Structs35_Test() { StructsTestClass_35_Notes.Note(); - Assert.True(StructsTestClass_35.testMethod()); + Assert.IsTrue(StructsTestClass_35.testMethod()); } [TestMethod] public void Structs36_Test() { StructsTestClass_36_Notes.Note(); - Assert.True(StructsTestClass_36.testMethod()); + Assert.IsTrue(StructsTestClass_36.testMethod()); } [TestMethod] public void Structs37_Test() { StructsTestClass_37_Notes.Note(); - Assert.True(StructsTestClass_37.testMethod()); + Assert.IsTrue(StructsTestClass_37.testMethod()); } [TestMethod] public void Structs38_Test() { StructsTestClass_38_Notes.Note(); - Assert.True(StructsTestClass_38.testMethod()); + Assert.IsTrue(StructsTestClass_38.testMethod()); } [TestMethod] public void Structs40_Test() { StructsTestClass_40_Notes.Note(); - Assert.True(StructsTestClass_40.testMethod()); + Assert.IsTrue(StructsTestClass_40.testMethod()); } [TestMethod] public void Structs41_Test() { StructsTestClass_41_Notes.Note(); - Assert.True(StructsTestClass_41.testMethod()); + Assert.IsTrue(StructsTestClass_41.testMethod()); } [TestMethod] public void Structs42_Test() { StructsTestClass_42_Notes.Note(); - Assert.True(StructsTestClass_42.testMethod()); + Assert.IsTrue(StructsTestClass_42.testMethod()); } [TestMethod] public void Structs43_Test() { StructsTestClass_43_Notes.Note(); - Assert.True(StructsTestClass_43.testMethod()); + Assert.IsTrue(StructsTestClass_43.testMethod()); } [TestMethod] public void Structs44_Test() { StructsTestClass_44_Notes.Note(); - Assert.True(StructsTestClass_44.testMethod()); + Assert.IsTrue(StructsTestClass_44.testMethod()); } [TestMethod] public void Structs55_Test() { StructsTestClass_55_Notes.Note(); - Assert.True(StructsTestClass_55.testMethod()); + Assert.IsTrue(StructsTestClass_55.testMethod()); } [TestMethod] @@ -184,14 +184,14 @@ public void ValueTest_StructEquals_01() AStruct s1 = new AStruct() { a = 1 }; AStruct s2 = new AStruct() { a = 2 }; - Assert.True(s1.Equals(s1), "Comparing struct failed: s1.Equals(s1)"); - Assert.False(s1.Equals(s2), "Comparing struct failed: s1.Equals(s2)"); - Assert.True(s1.a.Equals(s1.a), "Comparing struct failed: s1.a.Equals(s1.a)"); - Assert.False(s1.a.Equals(s2.a), "Comparing struct failed: s1.a.Equals(s2.a)"); + Assert.IsTrue(s1.Equals(s1), "Comparing struct failed: s1.Equals(s1)"); + Assert.IsFalse(s1.Equals(s2), "Comparing struct failed: s1.Equals(s2)"); + Assert.IsTrue(s1.a.Equals(s1.a), "Comparing struct failed: s1.a.Equals(s1.a)"); + Assert.IsFalse(s1.a.Equals(s2.a), "Comparing struct failed: s1.a.Equals(s2.a)"); // TODO // these are failing: need to fix the comparer at CLR - //Assert.False(s1.Equals(null), "Comparing struct failed: s1.Equals(null)"); - //Assert.False(s1.Equals(null), "Comparing struct failed: s1.Equals(null)"); + //Assert.IsFalse(s1.Equals(null), "Comparing struct failed: s1.Equals(null)"); + //Assert.IsFalse(s1.Equals(null), "Comparing struct failed: s1.Equals(null)"); } //Compiled Test Cases diff --git a/Tests/NFUnitTestSystemLib/NFUnitTestSystemLib.nfproj b/Tests/NFUnitTestSystemLib/NFUnitTestSystemLib.nfproj index 50be7919..54803e8a 100644 --- a/Tests/NFUnitTestSystemLib/NFUnitTestSystemLib.nfproj +++ b/Tests/NFUnitTestSystemLib/NFUnitTestSystemLib.nfproj @@ -57,7 +57,7 @@ - + @@ -67,6 +67,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestSystemLib/UnitTestBoolean.cs b/Tests/NFUnitTestSystemLib/UnitTestBoolean.cs index 5fc42574..27662120 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestBoolean.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestBoolean.cs @@ -14,13 +14,13 @@ class BooleanTests [TestMethod] public void TrueString_Get_ReturnsTrue() { - Assert.Equal("True", bool.TrueString); + Assert.AreEqual("True", bool.TrueString); } [TestMethod] public void FalseString_Get_ReturnsFalse() { - Assert.Equal("False", bool.FalseString); + Assert.AreEqual("False", bool.FalseString); } [TestMethod] @@ -29,8 +29,8 @@ public void GetHashCode_Invoke_ReturnsExpected() bool _true = true; bool _false = false; - Assert.Equal(_true.GetHashCode(), 1); - Assert.Equal(_false.GetHashCode(), 0); + Assert.AreEqual(_true.GetHashCode(), 1); + Assert.AreEqual(_false.GetHashCode(), 0); } } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestByte.cs b/Tests/NFUnitTestSystemLib/UnitTestByte.cs index a572c931..b8e43c02 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestByte.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestByte.cs @@ -15,26 +15,26 @@ public class ByteTests public void Ctor_Empty() { var b = new byte(); - Assert.Equal((byte)0, b); + Assert.AreEqual((byte)0, b); } [TestMethod] public void Ctor_Value() { byte b = 41; - Assert.Equal((byte)41, b); + Assert.AreEqual((byte)41, b); } [TestMethod] public void MaxValue() { - Assert.Equal((byte)0xFF, byte.MaxValue); + Assert.AreEqual((byte)0xFF, byte.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal((byte)0, byte.MinValue); + Assert.AreEqual((byte)0, byte.MinValue); } [TestMethod] @@ -56,12 +56,12 @@ public void Equals() if (test.Obj is byte b2) { - Assert.Equal(test.Expected, test.B.Equals(b2), $"Casting Obj wasn't successful for {test.Obj}"); - Assert.Equal(test.Expected, test.B.GetHashCode().Equals(b2.GetHashCode()), $"HashCode of {test.B}({test.B.GetHashCode()}) differs from the one of {b2}(b2.GetHashCode())"); - Assert.Equal((byte)test.B, test.B.GetHashCode(), $"HashCode of {(byte)test.B} different from expected, is {test.B.GetHashCode()}"); + Assert.AreEqual(test.Expected, test.B.Equals(b2), $"Casting Obj wasn't successful for {test.Obj}"); + Assert.AreEqual(test.Expected, test.B.GetHashCode().Equals(b2.GetHashCode()), $"HashCode of {test.B}({test.B.GetHashCode()}) differs from the one of {b2}(b2.GetHashCode())"); + Assert.AreEqual((byte)test.B, test.B.GetHashCode(), $"HashCode of {(byte)test.B} different from expected, is {test.B.GetHashCode()}"); } - Assert.Equal(test.Expected, test.B.Equals(test.Obj), $"Equality test between {test.B} and {test.Obj} failed"); + Assert.AreEqual(test.Expected, test.B.Equals(test.Obj), $"Equality test between {test.B} and {test.Obj} failed"); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestChar.cs b/Tests/NFUnitTestSystemLib/UnitTestChar.cs index e001fd5a..388ec269 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestChar.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestChar.cs @@ -28,11 +28,11 @@ public void Equals() { if (test.Obj is char) { - Assert.Equal(test.Expected, test.C.Equals((char)test.Obj)); - Assert.Equal(test.Expected, test.C.GetHashCode().Equals(test.Obj.GetHashCode())); + Assert.AreEqual(test.Expected, test.C.Equals((char)test.Obj)); + Assert.AreEqual(test.Expected, test.C.GetHashCode().Equals(test.Obj.GetHashCode())); } - Assert.Equal(test.Expected, test.C.Equals(test.Obj)); + Assert.AreEqual(test.Expected, test.C.Equals(test.Obj)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestDateTime.cs b/Tests/NFUnitTestSystemLib/UnitTestDateTime.cs index f4c6b75f..baf13d93 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestDateTime.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestDateTime.cs @@ -83,7 +83,7 @@ public void DateTime_ConstructorTest3() OutputHelper.WriteLine("Creating Maximum DateTime and verifying"); DateTime maxDateTime = new DateTime(946708127999999999); - Assert.True(DateTime.MaxValue.Equals(maxDateTime)); + Assert.IsTrue(DateTime.MaxValue.Equals(maxDateTime)); } [TestMethod] @@ -99,11 +99,11 @@ public void DateTime_CompareToTest4() DateTime dt1 = DateTime_btwn_1801_And_2801(); DateTime dt2 = new DateTime(year, month, day, hour, minute, second, millisec); OutputHelper.WriteLine("Comparing two equal DateTimes"); - Assert.Equal(dt1.CompareTo(dt2), 0); + Assert.AreEqual(dt1.CompareTo(dt2), 0); OutputHelper.WriteLine("Comparing Unequal DateTimes and Verifying"); dt2 = dt1.Add(new TimeSpan(1)); - Assert.False(dt1.CompareTo(dt2) >= 0); - Assert.False(dt2.CompareTo(dt1) <= 0); + Assert.IsFalse(dt1.CompareTo(dt2) >= 0); + Assert.IsFalse(dt2.CompareTo(dt1) <= 0); } [TestMethod] @@ -117,7 +117,7 @@ public void DateTime_EqualsTest5() OutputHelper.WriteLine("Generating random DateTime"); DateTime dt1 = GetRandomDateTime(); DateTime dt2 = new DateTime(ticks); - Assert.True(dt1.Equals(dt2)); + Assert.IsTrue(dt1.Equals(dt2)); } [TestMethod] @@ -154,7 +154,7 @@ public void DateTime_ToStringTest06() } } string str = strArr[0] + "/" + strArr[1] + "/" + strArr[2] + " " + strArr[3] + ":" + strArr[4] + ":" + strArr[5]; - Assert.Equal(dt.ToString(), str); + Assert.AreEqual(dt.ToString(), str); } [TestMethod] @@ -188,18 +188,18 @@ public void DateTime_ToStringTest08() int length = 10; // check length - Assert.True(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); // check 'MM' - Assert.Equal(dt.Month, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'MM'"); + Assert.AreEqual(dt.Month, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'MM'"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'dd'"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(6, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(6, 4)), "Wrong output1 for 'yyyy'"); // check '/' - Assert.Equal("/", dtOutput1.Substring(2, 1), "Wrong output1 in for '-'"); - Assert.Equal("/", dtOutput1.Substring(5, 1), "Wrong output1 in for '-'"); + Assert.AreEqual("/", dtOutput1.Substring(2, 1), "Wrong output1 in for '-'"); + Assert.AreEqual("/", dtOutput1.Substring(5, 1), "Wrong output1 in for '-'"); } catch (Exception ex) { @@ -236,39 +236,39 @@ public void DateTime_ToStringTest09() int minLength = 19; // check length - Assert.True(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); // check 'dddd' int endIndex = dtOutput1.IndexOf(','); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.DayNames[(int)dt.DayOfWeek], dtOutput1.Substring(0, endIndex), "Wrong output1 for 'dddd'"); // check ',' - Assert.Equal(",", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ','"); + Assert.AreEqual(",", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ','"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 1, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 1, 1), "Wrong output1 in for ' '"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 2, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 2, 2)), "Wrong output1 in for 'dd'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 4, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 4, 1), "Wrong output1 in for ' '"); // check 'MMMM' var startIndex = dtOutput1.IndexOf(' ', endIndex + 2); endIndex = dtOutput1.IndexOf(' ', startIndex + 1); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.MonthNames[dt.Month - 1], dtOutput1.Substring(startIndex + 1, endIndex - 1 - startIndex), "Wrong output1 in for 'MMMM'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 1, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 1, 4)), "Wrong output1 for 'yyyy'"); } catch (Exception ex) { @@ -307,54 +307,54 @@ public void DateTime_ToStringTest10() int actualLength = dtOutput1.Length; // check length - Assert.True(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); // check 'dddd' int endIndex = dtOutput1.IndexOf(','); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.DayNames[(int)dt.DayOfWeek], dtOutput1.Substring(0, endIndex), "Wrong output1 for 'dddd'"); // check ',' - Assert.Equal(",", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ','"); + Assert.AreEqual(",", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ','"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 1, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 1, 1), "Wrong output1 in for ' '"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 2, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 2, 2)), "Wrong output1 in for 'dd'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 4, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 4, 1), "Wrong output1 in for ' '"); // check 'MMMM' var startIndex = dtOutput1.IndexOf(' ', endIndex + 2); endIndex = dtOutput1.IndexOf(' ', startIndex + 1); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.MonthNames[dt.Month - 1], dtOutput1.Substring(startIndex + 1, endIndex - 1 - startIndex), "Wrong output1 in for 'MMMM'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 1, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 1, 4)), "Wrong output1 for 'yyyy'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 5, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 5, 1), "Wrong output1 in for ' '"); startIndex = endIndex + 6; // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(startIndex, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(startIndex, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(startIndex + 3, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(startIndex + 3, 2)), "Wrong output1 in for 'mm'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(startIndex + 2, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(startIndex + 2, 1), "Wrong output1 in for ':'"); } catch (Exception ex) { @@ -392,57 +392,57 @@ public void DateTime_ToStringTest11() int actualLength = dtOutput1.Length; // check length - Assert.True(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); // check 'dddd' int endIndex = dtOutput1.IndexOf(','); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.DayNames[(int)dt.DayOfWeek], dtOutput1.Substring(0, endIndex), "Wrong output1 for 'dddd'"); // check ',' - Assert.Equal(",", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ','"); + Assert.AreEqual(",", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ','"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 1, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 1, 1), "Wrong output1 in for ' '"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 2, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 2, 2)), "Wrong output1 in for 'dd'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 4, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 4, 1), "Wrong output1 in for ' '"); // check 'MMMM' var startIndex = dtOutput1.IndexOf(' ', endIndex + 2); endIndex = dtOutput1.IndexOf(' ', startIndex + 1); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.MonthNames[dt.Month - 1], dtOutput1.Substring(startIndex + 1, endIndex - 1 - startIndex), "Wrong output1 in for 'MMMM'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 1, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 1, 4)), "Wrong output1 for 'yyyy'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 5, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 5, 1), "Wrong output1 in for ' '"); startIndex = endIndex + 6; // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(startIndex, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(startIndex, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(startIndex + 3, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(startIndex + 3, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(startIndex + 6, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(startIndex + 6, 2)), "Wrong output1 in for 'ss'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(startIndex + 2, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(startIndex + 5, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(startIndex + 2, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(startIndex + 5, 1), "Wrong output1 in for ':'"); } catch (Exception ex) { @@ -479,26 +479,26 @@ public void DateTime_ToStringTest12() int length = 16; // check length - Assert.True(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); // check 'MM' - Assert.Equal(dt.Month, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'MM'"); + Assert.AreEqual(dt.Month, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'MM'"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'dd'"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(6, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(6, 4)), "Wrong output1 for 'yyyy'"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); // check '/' - Assert.Equal("/", dtOutput1.Substring(2, 1), "Wrong output1 in for '/'"); - Assert.Equal("/", dtOutput1.Substring(5, 1), "Wrong output1 in for '/'"); + Assert.AreEqual("/", dtOutput1.Substring(2, 1), "Wrong output1 in for '/'"); + Assert.AreEqual("/", dtOutput1.Substring(5, 1), "Wrong output1 in for '/'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(10, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(10, 1), "Wrong output1 in for ' '"); // check ':' - Assert.Equal(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); } catch (Exception ex) { @@ -536,29 +536,29 @@ public void DateTime_ToStringTest13() int length = 19; // check length - Assert.True(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); // check 'MM' - Assert.Equal(dt.Month, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'MM'"); + Assert.AreEqual(dt.Month, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'MM'"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'dd'"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(6, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(6, 4)), "Wrong output1 for 'yyyy'"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'ss'"); // check '/' - Assert.Equal("/", dtOutput1.Substring(2, 1), "Wrong output1 in for '/'"); - Assert.Equal("/", dtOutput1.Substring(5, 1), "Wrong output1 in for '/'"); + Assert.AreEqual("/", dtOutput1.Substring(2, 1), "Wrong output1 in for '/'"); + Assert.AreEqual("/", dtOutput1.Substring(5, 1), "Wrong output1 in for '/'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(10, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(10, 1), "Wrong output1 in for ' '"); // check ':' - Assert.Equal(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(16, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(16, 1), "Wrong output1 in for ':'"); } catch (Exception ex) { @@ -597,34 +597,34 @@ public void DateTime_ToStringTest14() int minLength = 6; // check length - Assert.True(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); - Assert.True(dtOutput2.Length >= minLength, $"Wrong output1 length: {dtOutput2.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput2.Length >= minLength, $"Wrong output1 length: {dtOutput2.Length}, should have been at least {minLength}"); // check 'MMMM' var endIndex = dtOutput1.IndexOf(' '); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.MonthNames[dt.Month - 1], dtOutput1.Substring(0, endIndex), "Wrong output1 in for 'MMMM'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 1, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 1, 2)), "Wrong output1 in for 'dd'"); // check 'MMMM' endIndex = dtOutput2.IndexOf(' '); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.MonthNames[dt.Month - 1], dtOutput2.Substring(0, endIndex), "Wrong output1 in for 'MMMM'"); // check ' ' - Assert.Equal(" ", dtOutput2.Substring(endIndex, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput2.Substring(endIndex, 1), "Wrong output1 in for ' '"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput2.Substring(endIndex + 1, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput2.Substring(endIndex + 1, 2)), "Wrong output1 in for 'dd'"); } catch (Exception ex) @@ -665,53 +665,53 @@ public void DateTime_ToStringTest15() int length = 28; // check length - Assert.True(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); - Assert.True(length == dtOutput2.Length, $"Wrong output1 length: {dtOutput2.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput2.Length, $"Wrong output1 length: {dtOutput2.Length}, should have been {length}"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(0, 4)), "Wrong output1 for 'yyyy'"); - Assert.Equal(dt.Year, int.Parse(dtOutput2.Substring(0, 4)), "Wrong output2 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(0, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput2.Substring(0, 4)), "Wrong output2 for 'yyyy'"); // check 'MM' - Assert.Equal(dt.Month, int.Parse(dtOutput1.Substring(5, 2)), "Wrong output1 in for 'MM'"); - Assert.Equal(dt.Month, int.Parse(dtOutput2.Substring(5, 2)), "Wrong output2 in for 'MM'"); + Assert.AreEqual(dt.Month, int.Parse(dtOutput1.Substring(5, 2)), "Wrong output1 in for 'MM'"); + Assert.AreEqual(dt.Month, int.Parse(dtOutput2.Substring(5, 2)), "Wrong output2 in for 'MM'"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(8, 2)), "Wrong output1 in for 'dd'"); - Assert.Equal(dt.Day, int.Parse(dtOutput2.Substring(8, 2)), "Wrong output2 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(8, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput2.Substring(8, 2)), "Wrong output2 in for 'dd'"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); - Assert.Equal(dt.Hour, int.Parse(dtOutput2.Substring(11, 2)), "Wrong output2 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput2.Substring(11, 2)), "Wrong output2 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); - Assert.Equal(dt.Minute, int.Parse(dtOutput2.Substring(14, 2)), "Wrong output2 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput2.Substring(14, 2)), "Wrong output2 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'ss'"); - Assert.Equal(dt.Second, int.Parse(dtOutput2.Substring(17, 2)), "Wrong output2 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput2.Substring(17, 2)), "Wrong output2 in for 'ss'"); // check 'fffffff' // need to do the math to get the fraction part from ticks var fraction = dt.Ticks % _TicksPerSecond; - Assert.Equal(fraction, int.Parse(dtOutput1.Substring(20, 7)), "Wrong output1 in for 'fffffff'"); - Assert.Equal(fraction, int.Parse(dtOutput2.Substring(20, 7)), "Wrong output2 in for 'fffffff'"); + Assert.AreEqual(fraction, int.Parse(dtOutput1.Substring(20, 7)), "Wrong output1 in for 'fffffff'"); + Assert.AreEqual(fraction, int.Parse(dtOutput2.Substring(20, 7)), "Wrong output2 in for 'fffffff'"); // check '-' - Assert.Equal("-", dtOutput1.Substring(4, 1), "Wrong output1 in for '-'"); - Assert.Equal("-", dtOutput2.Substring(4, 1), "Wrong output2 in for '-'"); - Assert.Equal("-", dtOutput1.Substring(7, 1), "Wrong output1 in for '-'"); - Assert.Equal("-", dtOutput2.Substring(7, 1), "Wrong output2 in for '-'"); + Assert.AreEqual("-", dtOutput1.Substring(4, 1), "Wrong output1 in for '-'"); + Assert.AreEqual("-", dtOutput2.Substring(4, 1), "Wrong output2 in for '-'"); + Assert.AreEqual("-", dtOutput1.Substring(7, 1), "Wrong output1 in for '-'"); + Assert.AreEqual("-", dtOutput2.Substring(7, 1), "Wrong output2 in for '-'"); // check 'T' - Assert.Equal("T", dtOutput1.Substring(10, 1), "Wrong output1 in for 'T'"); - Assert.Equal("T", dtOutput2.Substring(10, 1), "Wrong output2 in for 'T'"); + Assert.AreEqual("T", dtOutput1.Substring(10, 1), "Wrong output1 in for 'T'"); + Assert.AreEqual("T", dtOutput2.Substring(10, 1), "Wrong output2 in for 'T'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput2.Substring(13, 1), "Wrong output2 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(16, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput2.Substring(16, 1), "Wrong output2 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput2.Substring(13, 1), "Wrong output2 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(16, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput2.Substring(16, 1), "Wrong output2 in for ':'"); // check '.' - Assert.Equal(".", dtOutput1.Substring(19, 1), "Wrong output1 in for '.'"); - Assert.Equal(".", dtOutput2.Substring(19, 1), "Wrong output2 in for '.'"); + Assert.AreEqual(".", dtOutput1.Substring(19, 1), "Wrong output1 in for '.'"); + Assert.AreEqual(".", dtOutput2.Substring(19, 1), "Wrong output2 in for '.'"); // check 'Z' - Assert.Equal("Z", dtOutput1.Substring(27, 1), "Wrong output1 in for 'Z'"); - Assert.Equal("Z", dtOutput2.Substring(27, 1), "Wrong output2 in for 'Z'"); + Assert.AreEqual("Z", dtOutput1.Substring(27, 1), "Wrong output1 in for 'Z'"); + Assert.AreEqual("Z", dtOutput2.Substring(27, 1), "Wrong output2 in for 'Z'"); } catch (Exception ex) { @@ -751,70 +751,70 @@ public void DateTime_ToStringTest16() int length = 29; // check length - Assert.True(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); - Assert.True(length == dtOutput2.Length, $"Wrong output1 length: {dtOutput2.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput2.Length, $"Wrong output1 length: {dtOutput2.Length}, should have been {length}"); // check 'ddd' - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.AbbreviatedDayNames[(int)dt.DayOfWeek], dtOutput1.Substring(0, 3), "Wrong output1 in for 'ddd'"); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.AbbreviatedDayNames[(int)dt.DayOfWeek], dtOutput2.Substring(0, 3), "Wrong output1 in for 'ddd'"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(5, 2)), "Wrong output1 in for 'dd'"); - Assert.Equal(dt.Day, int.Parse(dtOutput2.Substring(5, 2)), "Wrong output2 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(5, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput2.Substring(5, 2)), "Wrong output2 in for 'dd'"); // check 'MMM' - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.AbbreviatedMonthNames[dt.Month -1], dtOutput1.Substring(8, 3), "Wrong output1 in for 'MMM'"); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.AbbreviatedMonthNames[dt.Month - 1], dtOutput2.Substring(8, 3), "Wrong output1 in for 'MMM'"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(12, 4)), "Wrong output1 for 'yyyy'"); - Assert.Equal(dt.Year, int.Parse(dtOutput2.Substring(12, 4)), "Wrong output2 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(12, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput2.Substring(12, 4)), "Wrong output2 for 'yyyy'"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'HH'"); - Assert.Equal(dt.Hour, int.Parse(dtOutput2.Substring(17, 2)), "Wrong output2 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput2.Substring(17, 2)), "Wrong output2 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(20, 2)), "Wrong output1 in for 'mm'"); - Assert.Equal(dt.Minute, int.Parse(dtOutput2.Substring(20, 2)), "Wrong output2 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(20, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput2.Substring(20, 2)), "Wrong output2 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(23, 2)), "Wrong output1 in for 'ss'"); - Assert.Equal(dt.Second, int.Parse(dtOutput2.Substring(23, 2)), "Wrong output2 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(23, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput2.Substring(23, 2)), "Wrong output2 in for 'ss'"); // check ',' - Assert.Equal(",", dtOutput1.Substring(3, 1), "Wrong output1 in for ','"); - Assert.Equal(",", dtOutput2.Substring(3, 1), "Wrong output1 in for ','"); + Assert.AreEqual(",", dtOutput1.Substring(3, 1), "Wrong output1 in for ','"); + Assert.AreEqual(",", dtOutput2.Substring(3, 1), "Wrong output1 in for ','"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(4, 1), "Wrong output1 in for ' '"); - Assert.Equal(" ", dtOutput2.Substring(4, 1), "Wrong output2 in for ' '"); - Assert.Equal(" ", dtOutput1.Substring(7, 1), "Wrong output1 in for ' '"); - Assert.Equal(" ", dtOutput2.Substring(7, 1), "Wrong output2 in for ' '"); - Assert.Equal(" ", dtOutput1.Substring(11, 1), "Wrong output1 in for ' '"); - Assert.Equal(" ", dtOutput2.Substring(11, 1), "Wrong output2 in for ' '"); - Assert.Equal(" ", dtOutput1.Substring(16, 1), "Wrong output1 in for ' '"); - Assert.Equal(" ", dtOutput2.Substring(16, 1), "Wrong output2 in for ' '"); - Assert.Equal(" ", dtOutput1.Substring(25, 1), "Wrong output1 in for ' '"); - Assert.Equal(" ", dtOutput2.Substring(25, 1), "Wrong output2 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(4, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput2.Substring(4, 1), "Wrong output2 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(7, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput2.Substring(7, 1), "Wrong output2 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(11, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput2.Substring(11, 1), "Wrong output2 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(16, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput2.Substring(16, 1), "Wrong output2 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(25, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput2.Substring(25, 1), "Wrong output2 in for ' '"); // check ':' - Assert.Equal(":", dtOutput1.Substring(19, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput2.Substring(19, 1), "Wrong output2 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(22, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput2.Substring(22, 1), "Wrong output2 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(19, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput2.Substring(19, 1), "Wrong output2 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(22, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput2.Substring(22, 1), "Wrong output2 in for ':'"); // check 'GMT' - Assert.Equal("GMT", dtOutput1.Substring(26, 3), "Wrong output1 in for 'GMT'"); - Assert.Equal("GMT", dtOutput2.Substring(26, 3), "Wrong output2 in for 'GMT'"); + Assert.AreEqual("GMT", dtOutput1.Substring(26, 3), "Wrong output1 in for 'GMT'"); + Assert.AreEqual("GMT", dtOutput2.Substring(26, 3), "Wrong output2 in for 'GMT'"); } catch (Exception ex) { @@ -851,31 +851,31 @@ public void DateTime_ToStringTest17() int length = 19; // check length - Assert.True(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(0, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(0, 4)), "Wrong output1 for 'yyyy'"); // check 'MM' - Assert.Equal(dt.Month, int.Parse(dtOutput1.Substring(5, 2)), "Wrong output1 in for 'MM'"); + Assert.AreEqual(dt.Month, int.Parse(dtOutput1.Substring(5, 2)), "Wrong output1 in for 'MM'"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(8, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(8, 2)), "Wrong output1 in for 'dd'"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'ss'"); // check '-' - Assert.Equal("-", dtOutput1.Substring(4, 1), "Wrong output1 in for '-'"); - Assert.Equal("-", dtOutput1.Substring(7, 1), "Wrong output1 in for '-'"); + Assert.AreEqual("-", dtOutput1.Substring(4, 1), "Wrong output1 in for '-'"); + Assert.AreEqual("-", dtOutput1.Substring(7, 1), "Wrong output1 in for '-'"); // check 'T' - Assert.Equal("T", dtOutput1.Substring(10, 1), "Wrong output1 in for 'T'"); + Assert.AreEqual("T", dtOutput1.Substring(10, 1), "Wrong output1 in for 'T'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(16, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(16, 1), "Wrong output1 in for ':'"); } catch (Exception ex) { @@ -912,18 +912,18 @@ public void DateTime_ToStringTest18() int length = 8; // check length - Assert.True(dtOutput1.Length >= length, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {length}"); + Assert.IsTrue(dtOutput1.Length >= length, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {length}"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(6, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(6, 2)), "Wrong output1 in for 'ss'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(2, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(5, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(2, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(5, 1), "Wrong output1 in for ':'"); } catch (Exception ex) { @@ -960,15 +960,15 @@ public void DateTime_ToStringTest19() int length = 5; // check length - Assert.True(dtOutput1.Length >= length, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {length}"); + Assert.IsTrue(dtOutput1.Length >= length, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {length}"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'mm'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(2, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(2, 1), "Wrong output1 in for ':'"); } catch (Exception ex) { @@ -1005,31 +1005,31 @@ public void DateTime_ToStringTest20() int length = 20; // check length - Assert.True(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(length == dtOutput1.Length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(0, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(0, 4)), "Wrong output1 for 'yyyy'"); // check 'MM' - Assert.Equal(dt.Month, int.Parse(dtOutput1.Substring(5, 2)), "Wrong output1 in for 'MM'"); + Assert.AreEqual(dt.Month, int.Parse(dtOutput1.Substring(5, 2)), "Wrong output1 in for 'MM'"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(8, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(8, 2)), "Wrong output1 in for 'dd'"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(11, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(14, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(17, 2)), "Wrong output1 in for 'ss'"); // check '-' - Assert.Equal("-", dtOutput1.Substring(4, 1), "Wrong output1 in for '-'"); - Assert.Equal("-", dtOutput1.Substring(7, 1), "Wrong output1 in for '-'"); + Assert.AreEqual("-", dtOutput1.Substring(4, 1), "Wrong output1 in for '-'"); + Assert.AreEqual("-", dtOutput1.Substring(7, 1), "Wrong output1 in for '-'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(10, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(10, 1), "Wrong output1 in for ' '"); // check ':' - Assert.Equal(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(16, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(13, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(16, 1), "Wrong output1 in for ':'"); // check 'Z' - Assert.Equal("Z", dtOutput1.Substring(19, 1), "Wrong output1 in for 'Z'"); + Assert.AreEqual("Z", dtOutput1.Substring(19, 1), "Wrong output1 in for 'Z'"); } catch (Exception ex) { @@ -1066,55 +1066,55 @@ public void DateTime_ToStringTest21() int minLength = 19; // check length - Assert.True(dtOutput1.Length > minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length > minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); // check 'dddd' int endIndex = dtOutput1.IndexOf(','); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.DayNames[(int)dt.DayOfWeek], dtOutput1.Substring(0, endIndex), "Wrong output1 for 'dddd'"); // check ',' - Assert.Equal(",", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ','"); + Assert.AreEqual(",", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ','"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 1, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 1, 1), "Wrong output1 in for ' '"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 2, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(endIndex + 2, 2)), "Wrong output1 in for 'dd'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 4, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 4, 1), "Wrong output1 in for ' '"); // check 'MMMM' var startIndex = dtOutput1.IndexOf(' ', endIndex + 2); endIndex = dtOutput1.IndexOf(' ', startIndex + 1); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.MonthNames[dt.Month - 1], dtOutput1.Substring(startIndex + 1, endIndex - 1 - startIndex), "Wrong output1 in for 'MMMM'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ' '"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 1, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 1, 4)), "Wrong output1 for 'yyyy'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(endIndex + 5, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(endIndex + 5, 1), "Wrong output1 in for ' '"); startIndex = endIndex + 6; // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(startIndex, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(startIndex, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(startIndex + 3, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(startIndex + 3, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(startIndex + 6, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(startIndex + 6, 2)), "Wrong output1 in for 'ss'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(startIndex + 2, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(startIndex + 5, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(startIndex + 2, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(startIndex + 5, 1), "Wrong output1 in for ':'"); } catch (Exception ex) { @@ -1154,26 +1154,26 @@ public void DateTime_ToStringTest22() int minLength = 6; // check length - Assert.True(dtOutput1.Length > minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); - Assert.True(dtOutput2.Length > minLength, $"Wrong output1 length: {dtOutput2.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length > minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput2.Length > minLength, $"Wrong output1 length: {dtOutput2.Length}, should have been at least {minLength}"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(0, 4)), "Wrong output1 for 'yyyy'"); - Assert.Equal(dt.Year, int.Parse(dtOutput2.Substring(0, 4)), "Wrong output2 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(0, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput2.Substring(0, 4)), "Wrong output2 for 'yyyy'"); // check 'MMMM' - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.MonthNames[dt.Month - 1], dtOutput1.Substring(5, dtOutput1.Length - 5), "Wrong output1 in for 'MMMM'"); - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.MonthNames[dt.Month - 1], dtOutput1.Substring(5, dtOutput2.Length - 5), "Wrong output1 in for 'MMMM'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(4, 1), "Wrong output1 in for ' '"); - Assert.Equal(" ", dtOutput2.Substring(4, 1), "Wrong output2 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(4, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput2.Substring(4, 1), "Wrong output2 in for ' '"); } catch (Exception ex) { @@ -1207,7 +1207,7 @@ public void DateTime_ToStringTest23() int minLength = 12; // check length - Assert.True(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); // check 'h' var endIndex = dtOutput1.IndexOf(':'); @@ -1217,38 +1217,38 @@ public void DateTime_ToStringTest23() { hour12 = 12; } - Assert.Equal(hour12, int.Parse(dtOutput1.Substring(0, endIndex)), "Wrong output1 for 'h'"); + Assert.AreEqual(hour12, int.Parse(dtOutput1.Substring(0, endIndex)), "Wrong output1 for 'h'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(endIndex + 1, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(endIndex + 1, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(endIndex + 4, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(endIndex + 4, 2)), "Wrong output1 in for 'ss'"); // check 'ff' // need to do the math to get the fraction part from ticks var fraction = dt.Ticks % _TicksPerSecond; - Assert.Equal(fraction.ToString("D7").Substring(0, 2), dtOutput1.Substring(endIndex + 7, 2), "Wrong output1 in for 'ff'"); + Assert.AreEqual(fraction.ToString("D7").Substring(0, 2), dtOutput1.Substring(endIndex + 7, 2), "Wrong output1 in for 'ff'"); // check 't' if (dt.Hour < 12) { if (CultureInfo.CurrentUICulture.DateTimeFormat.AMDesignator.Length >= 1) { - Assert.Equal(CultureInfo.CurrentUICulture.DateTimeFormat.AMDesignator[0].ToString(), dtOutput1.Substring(dtOutput1.Length - 1, 1), "Wrong output1 in for 't'"); + Assert.AreEqual(CultureInfo.CurrentUICulture.DateTimeFormat.AMDesignator[0].ToString(), dtOutput1.Substring(dtOutput1.Length - 1, 1), "Wrong output1 in for 't'"); } } else { - Assert.Equal(CultureInfo.CurrentUICulture.DateTimeFormat.PMDesignator[0].ToString(), dtOutput1.Substring(dtOutput1.Length - 1, 1), "Wrong output1 in for 't'"); + Assert.AreEqual(CultureInfo.CurrentUICulture.DateTimeFormat.PMDesignator[0].ToString(), dtOutput1.Substring(dtOutput1.Length - 1, 1), "Wrong output1 in for 't'"); } // check ':' - Assert.Equal(":", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(endIndex + 3, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(endIndex, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(endIndex + 3, 1), "Wrong output1 in for ':'"); // check '.' - Assert.Equal(".", dtOutput1.Substring(endIndex + 6, 1), "Wrong output1 in for '.'"); + Assert.AreEqual(".", dtOutput1.Substring(endIndex + 6, 1), "Wrong output1 in for '.'"); } catch (Exception ex) { @@ -1282,19 +1282,19 @@ public void DateTime_ToStringTest24() int minLength = 10; // check length - Assert.True(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); // check 'd' var endIndex = dtOutput1.IndexOf(' '); - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(0, endIndex)), "Wrong output1 in for 'd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(0, endIndex)), "Wrong output1 in for 'd'"); // check 'MMM' - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.AbbreviatedMonthNames[dt.Month - 1], dtOutput1.Substring(endIndex + 1, 3), "Wrong output1 in for 'MMM'"); // check 'yyyy' - Assert.Equal(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 5, 4)), "Wrong output1 for 'yyyy'"); + Assert.AreEqual(dt.Year, int.Parse(dtOutput1.Substring(endIndex + 5, 4)), "Wrong output1 for 'yyyy'"); } catch (Exception ex) { @@ -1328,28 +1328,28 @@ public void DateTime_ToStringTest25() int length = 10; // check length - Assert.True(dtOutput1.Length == length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(dtOutput1.Length == length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(3, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(6, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(6, 2)), "Wrong output1 in for 'ss'"); // check 'f' // need to do the math to get the fraction part from ticks var fraction = dt.Ticks % _TicksPerSecond; - Assert.Equal(fraction.ToString("D7").Substring(0, 1), dtOutput1.Substring(9, 1), "Wrong output1 in for 'f'"); + Assert.AreEqual(fraction.ToString("D7").Substring(0, 1), dtOutput1.Substring(9, 1), "Wrong output1 in for 'f'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(2, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(5, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(2, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(5, 1), "Wrong output1 in for ':'"); // check '.' - Assert.Equal(".", dtOutput1.Substring(8, 1), "Wrong output1 in for '.'"); + Assert.AreEqual(".", dtOutput1.Substring(8, 1), "Wrong output1 in for '.'"); } catch (Exception ex) { @@ -1383,33 +1383,33 @@ public void DateTime_ToStringTest26() int length = 15; // check length - Assert.True(dtOutput1.Length == length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); + Assert.IsTrue(dtOutput1.Length == length, $"Wrong output1 length: {dtOutput1.Length}, should have been {length}"); // check 'dd' - Assert.Equal(dt.Day, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'dd'"); + Assert.AreEqual(dt.Day, int.Parse(dtOutput1.Substring(0, 2)), "Wrong output1 in for 'dd'"); // check 'MMM' - Assert.Equal( + Assert.AreEqual( DateTimeFormatInfo.CurrentInfo.AbbreviatedMonthNames[dt.Month - 1], dtOutput1.Substring(3, 3), "Wrong output1 in for 'MMM'"); // check 'HH' - Assert.Equal(dt.Hour, int.Parse(dtOutput1.Substring(7, 2)), "Wrong output1 in for 'HH'"); + Assert.AreEqual(dt.Hour, int.Parse(dtOutput1.Substring(7, 2)), "Wrong output1 in for 'HH'"); // check 'mm' - Assert.Equal(dt.Minute, int.Parse(dtOutput1.Substring(7+3, 2)), "Wrong output1 in for 'mm'"); + Assert.AreEqual(dt.Minute, int.Parse(dtOutput1.Substring(7+3, 2)), "Wrong output1 in for 'mm'"); // check 'ss' - Assert.Equal(dt.Second, int.Parse(dtOutput1.Substring(7+6, 2)), "Wrong output1 in for 'ss'"); + Assert.AreEqual(dt.Second, int.Parse(dtOutput1.Substring(7+6, 2)), "Wrong output1 in for 'ss'"); // check ':' - Assert.Equal(":", dtOutput1.Substring(7+2, 1), "Wrong output1 in for ':'"); - Assert.Equal(":", dtOutput1.Substring(7+5, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(7+2, 1), "Wrong output1 in for ':'"); + Assert.AreEqual(":", dtOutput1.Substring(7+5, 1), "Wrong output1 in for ':'"); // check ' ' - Assert.Equal(" ", dtOutput1.Substring(2, 1), "Wrong output1 in for ' '"); - Assert.Equal(" ", dtOutput1.Substring(6, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(2, 1), "Wrong output1 in for ' '"); + Assert.AreEqual(" ", dtOutput1.Substring(6, 1), "Wrong output1 in for ' '"); } catch (Exception ex) { @@ -1443,13 +1443,13 @@ public void DateTime_ToStringTest27() int minLength = 8; // check length - Assert.True(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); + Assert.IsTrue(dtOutput1.Length >= minLength, $"Wrong output1 length: {dtOutput1.Length}, should have been at least {minLength}"); // check 'M' - Assert.Equal(dt.Month, int.Parse(dtOutput1.Substring(7)), "Wrong output1 in for 'M'"); + Assert.AreEqual(dt.Month, int.Parse(dtOutput1.Substring(7)), "Wrong output1 in for 'M'"); // check 'Month: ' - Assert.Equal("Month: ", dtOutput1.Substring(0, 7), "Wrong output1 in for 'Month: '"); + Assert.AreEqual("Month: ", dtOutput1.Substring(0, 7), "Wrong output1 in for 'Month: '"); } catch (Exception ex) { @@ -1482,7 +1482,7 @@ public void DateTime_AddTest8() } OutputHelper.WriteLine("Adding '" + ts.ToString() + "' Timespan to '" + dt1.ToString() + "'"); DateTime dt2 = dt1.Add(ts); - Assert.Equal(dt2.Ticks, (dt1.Ticks + ts.Ticks)); + Assert.AreEqual(dt2.Ticks, (dt1.Ticks + ts.Ticks)); } } @@ -1780,7 +1780,7 @@ public void DateTime_AddTicks_PositiveTest20() long ticks = (long)random.Next(1000); OutputHelper.WriteLine("Adding '" + ticks + "' ticks to '" + dt1.ToString() + "'"); DateTime dt2 = dt1.AddTicks(ticks); - Assert.Equal(dt2.Ticks, (dt1.Ticks + ticks)); + Assert.AreEqual(dt2.Ticks, (dt1.Ticks + ticks)); } } @@ -1801,7 +1801,7 @@ public void DateTime_AddTicks_NegativeTest21() long ticks = -(long)random.Next(1000); OutputHelper.WriteLine("Adding '" + ticks + "' ticks to '" + dt1.ToString() + "'"); DateTime dt2 = dt1.AddTicks(ticks); - Assert.Equal(dt2.Ticks, (dt1.Ticks + ticks)); + Assert.AreEqual(dt2.Ticks, (dt1.Ticks + ticks)); } } @@ -1866,10 +1866,10 @@ public void DateTime_EqualsTest25() OutputHelper.WriteLine("And Verifying they are equal"); DateTime dt1 = DateTime_btwn_1801_And_2801(); DateTime dt2 = new DateTime(year, month, day, hour, minute, second, millisec); - Assert.True(DateTime.Equals(dt1, dt2)); + Assert.IsTrue(DateTime.Equals(dt1, dt2)); object obj1 = (object)dt1, obj2 = (object)dt2; - Assert.True(object.Equals(obj1, obj2)); - Assert.True(dt1.Equals(obj2)); + Assert.IsTrue(object.Equals(obj1, obj2)); + Assert.IsTrue(dt1.Equals(obj2)); } [TestMethod] @@ -1882,7 +1882,7 @@ public void DateTime_Subtract_DateTimeTest26() TimeSpan ts1 = dt1.Subtract(dt2); TimeSpan ts2 = new TimeSpan(dt1.Ticks - dt2.Ticks); - Assert.True(ts1 == ts2); + Assert.IsTrue(ts1 == ts2); } [TestMethod] @@ -1911,7 +1911,7 @@ public void DateTime_Subtract_TimeSpanTest27() OutputHelper.WriteLine(dt2.ToString()); DateTime dt3 = new DateTime(dt1.Ticks - ts.Ticks); OutputHelper.WriteLine(dt3.ToString()); - Assert.Equal(DateTime.Compare(dt2, dt3), 0); + Assert.AreEqual(DateTime.Compare(dt2, dt3), 0); } } @@ -1937,7 +1937,7 @@ public void DateTime_op_AdditionTest30() } DateTime dt2 = dt1 + ts; DateTime dt3 = new DateTime(dt1.Ticks + ts.Ticks); - Assert.Equal(DateTime.Compare(dt2, dt3), 0); + Assert.AreEqual(DateTime.Compare(dt2, dt3), 0); } } @@ -1953,7 +1953,7 @@ public void DateTime_op_Subtraction_DateTimeTest31() DateTime dt1 = dtArr[i]; DateTime dt2 = new DateTime(504911232000000000 + random.Next(1000) + 1); TimeSpan ts = dt1 - dt2; - Assert.Equal(ts.Ticks, (dt1.Ticks - dt2.Ticks)); + Assert.AreEqual(ts.Ticks, (dt1.Ticks - dt2.Ticks)); } } @@ -1970,7 +1970,7 @@ public void DateTime_op_Subtraction_TimeSpanTest32() TimeSpan ts = new TimeSpan(random.Next(10000)); DateTime dt2 = dt1 - ts; - Assert.Equal(dt2.Ticks, (dt1.Ticks - ts.Ticks)); + Assert.AreEqual(dt2.Ticks, (dt1.Ticks - ts.Ticks)); } } @@ -2091,7 +2091,7 @@ public void DateTime_MinValueTest39() OutputHelper.WriteLine("Getting the Min. DateTime and Verifying"); DateTime field = DateTime.MinValue; OutputHelper.WriteLine(field.Ticks.ToString()); - Assert.Equal(field.Ticks, 504911232000000000); + Assert.AreEqual(field.Ticks, 504911232000000000); } [TestMethod] @@ -2103,7 +2103,7 @@ public void DateTime_MaxValueTest40() OutputHelper.WriteLine("Getting the Max. DateTime and Verifying"); DateTime field = DateTime.MaxValue; OutputHelper.WriteLine(field.Ticks.ToString()); - Assert.Equal(field.Ticks, 946708127999999999); + Assert.AreEqual(field.Ticks, 946708127999999999); } [TestMethod] @@ -2133,7 +2133,7 @@ public void DateTime_DayTest42() OutputHelper.WriteLine("Creating a DateTime, getting the Day and Verifying"); DateTime testDateTime = GetRandomDateTime(); Int32 _day = testDateTime.Day; - Assert.Equal(_day, day); + Assert.AreEqual(_day, day); } [TestMethod] @@ -2145,7 +2145,7 @@ public void DateTime_DayOfWeekTest43() OutputHelper.WriteLine("Creating a DateTime, getting the DayOfWeek and Verifying"); DateTime testDateTime = new DateTime(2005, 1, 28); DayOfWeek prop = testDateTime.DayOfWeek; - Assert.Equal((int)prop, (int)DayOfWeek.Friday); + Assert.AreEqual((int)prop, (int)DayOfWeek.Friday); } [TestMethod] @@ -2158,7 +2158,7 @@ public void DateTime_DayOfYearTest44() OutputHelper.WriteLine("DateTime::DayOfYear - Normal "); DateTime testDateTime = new DateTime(2005, 1, 1); int _dayOfYear = testDateTime.DayOfYear; - Assert.Equal(_dayOfYear, 1); + Assert.AreEqual(_dayOfYear, 1); } [TestMethod] @@ -2170,7 +2170,7 @@ public void DateTime_HourTest45() OutputHelper.WriteLine("Creating a DateTime, getting the Hour and Verifying"); DateTime testDateTime = GetRandomDateTime(); Int32 _hour = testDateTime.Hour; - Assert.Equal(_hour, hour); + Assert.AreEqual(_hour, hour); } [TestMethod] @@ -2182,7 +2182,7 @@ public void DateTime_MillisecondTest46() OutputHelper.WriteLine("Creating a DateTime, getting the Milliseconds and Verifying"); DateTime testDateTime = GetRandomDateTime(); Int32 _mSec = testDateTime.Millisecond; - Assert.Equal(_mSec, millisec); + Assert.AreEqual(_mSec, millisec); } [TestMethod] @@ -2194,7 +2194,7 @@ public void DateTime_MinuteTest47() OutputHelper.WriteLine("Creating a DateTime, getting the Minute and Verifying"); DateTime testDateTime = GetRandomDateTime(); Int32 _minute = testDateTime.Minute; - Assert.Equal(_minute, minute); + Assert.AreEqual(_minute, minute); } [TestMethod] @@ -2206,7 +2206,7 @@ public void DateTime_MonthTest48() OutputHelper.WriteLine("Creating a DateTime, getting the Month and Verifying"); DateTime testDateTime = GetRandomDateTime(); Int32 _month = testDateTime.Month; - Assert.Equal(_month, month); + Assert.AreEqual(_month, month); } [TestMethod] @@ -2238,7 +2238,7 @@ public void DateTime_SecondTest51() OutputHelper.WriteLine("Creating a DateTime, getting the Second and Verifying"); DateTime testDateTime = GetRandomDateTime(); Int32 _sec = testDateTime.Second; - Assert.Equal(_sec, second); + Assert.AreEqual(_sec, second); } [TestMethod] @@ -2250,7 +2250,7 @@ public void DateTime_TicksTest52() OutputHelper.WriteLine("Creating a DateTime, getting the Ticks and Verifying"); DateTime testDateTime = new System.DateTime(504911232000000000); long _ticks = testDateTime.Ticks; - Assert.Equal(_ticks, 504911232000000000); + Assert.AreEqual(_ticks, 504911232000000000); } [TestMethod] @@ -2262,7 +2262,7 @@ public void DateTime_YearTest54() OutputHelper.WriteLine("Creating a DateTime.Today, getting the year and Verifying"); DateTime testDateTime = GetRandomDateTime(); Int32 _year = testDateTime.Year; - Assert.Equal(_year, year); + Assert.AreEqual(_year, year); } //=================================================================================== @@ -2275,7 +2275,7 @@ public void DateTime_BelowMinDateTime_ArgumentOutOfRangeExceptionTest58() { OutputHelper.WriteLine("Creating a DateTime with -ve Ticks and,"); OutputHelper.WriteLine("verifying ArgumentOutOfRangeException is thrown"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { DateTime dt = new DateTime(-(new Random().Next(10) + 1)); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { DateTime dt = new DateTime(-(new Random().Next(10) + 1)); }); } [TestMethod] @@ -2283,8 +2283,8 @@ public void DateTime_AboveMaxDatTime_ArgumentOutOfRangeExceptionTest59() { OutputHelper.WriteLine("Creating a DateTime later than DateTime.MaxValue and,"); OutputHelper.WriteLine("verifying ArgumentOutOfRangeException is thrown"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { DateTime dt1 = new DateTime(DateTime.MaxValue.Ticks + 1); }); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { DateTime dt2 = new DateTime(10000, 1, 1, 0, 0, 0, 0); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { DateTime dt1 = new DateTime(DateTime.MaxValue.Ticks + 1); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { DateTime dt2 = new DateTime(10000, 1, 1, 0, 0, 0, 0); }); } [TestMethod] @@ -2300,10 +2300,10 @@ public void DateTime_ParseTest00() string dtOutput1 = dt.ToString(specifier1); - Assert.Equal(DateTime.Parse(dtOutput1).ToString(specifier1), dt.ToString(specifier1), $"DateTime.Parse '{dt}' failed"); + Assert.AreEqual(DateTime.Parse(dtOutput1).ToString(specifier1), dt.ToString(specifier1), $"DateTime.Parse '{dt}' failed"); - Assert.True(DateTime.TryParse(dtOutput1, out DateTime result), $"DateTime.TryParse '{dt}' failed"); - Assert.Equal(result.ToString(specifier1), dt.ToString(specifier1), $"DateTime.TryParse '{dt}' returning wrong value: '{result}'"); + Assert.IsTrue(DateTime.TryParse(dtOutput1, out DateTime result), $"DateTime.TryParse '{dt}' failed"); + Assert.AreEqual(result.ToString(specifier1), dt.ToString(specifier1), $"DateTime.TryParse '{dt}' returning wrong value: '{result}'"); } } @@ -2321,10 +2321,10 @@ public void DateTime_ParseTest01() string dtOutput1 = dt.ToString(specifier1); // expected format is yyyy-MM-ddTHH:mm:ss.fffffffK - Assert.Equal(DateTime.Parse(dtOutput1).ToString(specifier1), dt.ToString(specifier1), $"Parsing DateTime '{dt}' failed"); + Assert.AreEqual(DateTime.Parse(dtOutput1).ToString(specifier1), dt.ToString(specifier1), $"Parsing DateTime '{dt}' failed"); - Assert.True(DateTime.TryParse(dtOutput1, out DateTime result), $"DateTime.TryParse '{dt}' failed"); - Assert.Equal(result.ToString(specifier1), dt.ToString(specifier1), $"DateTime.TryParse '{dt}' returning wrong value: '{result}'"); + Assert.IsTrue(DateTime.TryParse(dtOutput1, out DateTime result), $"DateTime.TryParse '{dt}' failed"); + Assert.AreEqual(result.ToString(specifier1), dt.ToString(specifier1), $"DateTime.TryParse '{dt}' returning wrong value: '{result}'"); } } @@ -2342,10 +2342,10 @@ public void DateTime_ParseTest02() string dtOutput1 = dt.ToString(specifier1); // expected format is ddd, dd MMM yyyy HH':'mm':'ss 'GMT' - Assert.Equal(DateTime.Parse(dtOutput1).ToString(specifier1), dt.ToString(specifier1), $"Parsing DateTime '{dt}' failed"); + Assert.AreEqual(DateTime.Parse(dtOutput1).ToString(specifier1), dt.ToString(specifier1), $"Parsing DateTime '{dt}' failed"); - Assert.True(DateTime.TryParse(dtOutput1, out DateTime result), $"DateTime.TryParse '{dt}' failed"); - Assert.Equal(result.ToString(specifier1), dt.ToString(specifier1), $"DateTime.TryParse '{dt}' returning wrong value: '{result}'"); + Assert.IsTrue(DateTime.TryParse(dtOutput1, out DateTime result), $"DateTime.TryParse '{dt}' failed"); + Assert.AreEqual(result.ToString(specifier1), dt.ToString(specifier1), $"DateTime.TryParse '{dt}' returning wrong value: '{result}'"); } } @@ -2487,7 +2487,7 @@ public void DaysInMonthTest(int yr, int mnth) { OutputHelper.WriteLine("Year '" + yr + "' is a LeapYear, expected '29' days but got '" + daysInMonth + "' in Month '" + mnth + "'"); - Assert.Equal(daysInMonth, 29); + Assert.AreEqual(daysInMonth, 29); } else if (daysInMonth != 28) { @@ -2500,13 +2500,13 @@ public void DaysInMonthTest(int yr, int mnth) { OutputHelper.WriteLine("Year '" + yr + "' Month '" + mnth + "', expected '31' days but got '" + daysInMonth + "'"); - Assert.Equal(daysInMonth, 31); + Assert.AreEqual(daysInMonth, 31); } else { OutputHelper.WriteLine("Year '" + yr + "' Month '" + mnth + "', expected '30' days but got '" + daysInMonth + "'"); - Assert.Equal(daysInMonth, 30); + Assert.AreEqual(daysInMonth, 30); } } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestDouble.cs b/Tests/NFUnitTestSystemLib/UnitTestDouble.cs index 7a9e77bd..0391f3a9 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestDouble.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestDouble.cs @@ -15,53 +15,53 @@ public class DoubleTests public void Ctor_Empty() { var i = new double(); - Assert.Equal(0, i); + Assert.AreEqual(0, i); } [TestMethod] public void Ctor_Value() { double d = 41; - Assert.Equal(41, d); + Assert.AreEqual(41, d); d = 41.3; - Assert.Equal(41.3, d); + Assert.AreEqual(41.3, d); } [TestMethod] public void MaxValue() { - Assert.Equal(1.7976931348623157E+308, double.MaxValue); + Assert.AreEqual(1.7976931348623157E+308, double.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal(-1.7976931348623157E+308, double.MinValue); + Assert.AreEqual(-1.7976931348623157E+308, double.MinValue); } [TestMethod] public void Epsilon() { - Assert.Equal(4.9406564584124654E-324, double.Epsilon); + Assert.AreEqual(4.9406564584124654E-324, double.Epsilon); } [TestMethod] public void NaN() { - Assert.True(double.NaN.Equals(0.0d / 0.0d)); + Assert.IsTrue(double.NaN.Equals(0.0d / 0.0d)); } [TestMethod] public void NegativeInfinity() { - Assert.Equal(-1.0 / 0.0, double.NegativeInfinity); + Assert.AreEqual(-1.0 / 0.0, double.NegativeInfinity); } [TestMethod] public void PositiveInfinity() { - Assert.Equal(1.0 / 0.0, double.PositiveInfinity); + Assert.AreEqual(1.0 / 0.0, double.PositiveInfinity); } [TestMethod] @@ -82,23 +82,23 @@ public void Equals() { if (test.Value is double d2) { - Assert.Equal(test.Expected, test.D1.Equals(d2)); + Assert.AreEqual(test.Expected, test.D1.Equals(d2)); if (double.IsNaN((double)test.D1) && double.IsNaN(d2)) { - Assert.Equal(!test.Expected, (double)test.D1 == d2); - Assert.Equal(test.Expected, (double)test.D1 != d2); + Assert.AreEqual(!test.Expected, (double)test.D1 == d2); + Assert.AreEqual(test.Expected, (double)test.D1 != d2); } else { - Assert.Equal(test.Expected, (double)test.D1 == d2); - Assert.Equal(!test.Expected, (double)test.D1 != d2); + Assert.AreEqual(test.Expected, (double)test.D1 == d2); + Assert.AreEqual(!test.Expected, (double)test.D1 != d2); } - Assert.Equal(test.Expected, test.D1.GetHashCode().Equals(d2.GetHashCode())); + Assert.AreEqual(test.Expected, test.D1.GetHashCode().Equals(d2.GetHashCode())); } - Assert.Equal(test.Expected, test.D1.Equals(test.Value)); + Assert.AreEqual(test.Expected, test.D1.Equals(test.Value)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestGCTest.cs b/Tests/NFUnitTestSystemLib/UnitTestGCTest.cs index 870b458b..859f02f0 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestGCTest.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestGCTest.cs @@ -96,7 +96,7 @@ class FinalizeObject // OutputHelper.WriteLine("GC took " + slept); // m_Test1Result = m_hasFinalized2; - // Assert.True(m_hasFinalized2); + // Assert.IsTrue(m_hasFinalized2); //} //[TestMethod] @@ -131,7 +131,7 @@ class FinalizeObject // } // OutputHelper.WriteLine("GC took " + slept); - // Assert.False(m_hasFinalized1); + // Assert.IsFalse(m_hasFinalized1); //} //[TestMethod] @@ -147,7 +147,7 @@ class FinalizeObject // /// // OutputHelper.WriteLine("Tests WaitForPendingFinalizers, dependant on test 1"); // OutputHelper.WriteLine("will auto-fail if test 1 fails."); - // Assert.True(m_Test1Result); + // Assert.IsTrue(m_Test1Result); // OutputHelper.WriteLine("Create a FinalizeObject."); // FinalizeObject mfo = new FinalizeObject(); @@ -168,7 +168,7 @@ class FinalizeObject // GC.WaitForPendingFinalizers(); // System.GC.WaitForPendingFinalizers(); - // Assert.True(m_hasFinalized2); + // Assert.IsTrue(m_hasFinalized2); //} } diff --git a/Tests/NFUnitTestSystemLib/UnitTestGuid.cs b/Tests/NFUnitTestSystemLib/UnitTestGuid.cs index 37d1af26..1a3e49a9 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestGuid.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestGuid.cs @@ -31,16 +31,16 @@ public void Guid_Test() Guid theGuid = Guid.NewGuid(); byte[] bGuid1 = theGuid.ToByteArray(); - Assert.Equal(bGuid1.Length, 16); + Assert.AreEqual(bGuid1.Length, 16); Guid theSameGuid = new Guid(bGuid1); // must be the same - Assert.Equal(theGuid.CompareTo(theSameGuid), 0); - Assert.True(theGuid.Equals(theSameGuid)); + Assert.AreEqual(theGuid.CompareTo(theSameGuid), 0); + Assert.IsTrue(theGuid.Equals(theSameGuid)); Guid anotherGuid = Guid.NewGuid(); // must be the different - Assert.NotEqual(theGuid.CompareTo(anotherGuid), 0); - Assert.False(theGuid.Equals(anotherGuid)); + Assert.AreNotEqual(theGuid.CompareTo(anotherGuid), 0); + Assert.IsFalse(theGuid.Equals(anotherGuid)); } /// @@ -88,7 +88,7 @@ public void ArgumentException_Test3() size = random.Next(100); } Byte[] guidNot16 = GetRandomBytes(size); - Assert.Throws(typeof(ArgumentException), () => { Guid myGuid1 = new Guid(guidNot16); }); + Assert.ThrowsException(typeof(ArgumentException), () => { Guid myGuid1 = new Guid(guidNot16); }); } [TestMethod] @@ -101,7 +101,7 @@ public void ArgumentNullException_Test4() /// Byte[] nullByte = null; - Assert.Throws(typeof(ArgumentNullException), () => { Guid myGuid1 = new Guid(nullByte); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { Guid myGuid1 = new Guid(nullByte); }); } public static Guid GetGuid() @@ -200,7 +200,7 @@ public void Guid_Empty_Test8() Byte[] _bArr = guid.ToByteArray(); for (int i = 0; i < 16; i++) { - Assert.Equal(_bArr[i], (byte)0); + Assert.AreEqual(_bArr[i], (byte)0); } } @@ -215,18 +215,18 @@ public void Guid_CompareTo_Test9() Guid guid1 = Guid.Empty; OutputHelper.WriteLine("Verifing any instance of Guid, regardless of its value, is greater than null"); - Assert.Equal(guid1.CompareTo(null), 1); + Assert.AreEqual(guid1.CompareTo(null), 1); Byte[] _bArr = new Byte[16]; OutputHelper.WriteLine("Creating a Guid with all bytes zero"); Guid guid2 = new Guid(_bArr); - Assert.Equal(guid1.CompareTo(guid2), 0); + Assert.AreEqual(guid1.CompareTo(guid2), 0); Guid guid3 = new Guid(0x4dff36b5, 0x9dde, 0x4f76, 0x9a, 0x2a, 0x96, 0x43, 0x50, 0x47, 0x06, 0x3d); if (guid3.CompareTo(guid1) <= 0) { throw new Exception("Expected : " + guid3.ToString() + " is greater than " + guid1.ToString()); } Guid guid4 = new Guid(0x4dff36b5, 0x9dde, 0x4f76, 0x9a, 0x2a, 0x96, 0x43, 0x50, 0x47, 0x06, 0x3d); - Assert.Equal(guid4.CompareTo(guid3), 0); + Assert.AreEqual(guid4.CompareTo(guid3), 0); Guid guid5 = new Guid(0x4dff36b5, 0x9dde, 0x4f76, 0x9a, 0x2a, 0x96, 0x43, 0x50, 0x47, 0x06, 0x3e); if (guid5.CompareTo(guid4) <= 0) { @@ -265,7 +265,7 @@ public void Guid_ToString_Test10() for (int i = 0; i < strArr1.Length; i++) { OutputHelper.WriteLine(strArr1[i]); - Assert.Equal(String.Compare(strArr1[i], strArr2[i]), 0); + Assert.AreEqual(String.Compare(strArr1[i], strArr2[i]), 0); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs b/Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs index ab4e100a..a8c76a3d 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs @@ -56,7 +56,7 @@ public void SystemType1_GetType_Test() Type type = typeof(int); list.Add(type); string name = ((Type)list[i]).Name; - Assert.Equal(name, "Int32"); + Assert.AreEqual(name, "Int32"); i++; // No ApDomain in nano @@ -75,35 +75,35 @@ public void SystemType1_GetType_Test() type = Type.GetType("NFUnitTestSystemLib.UnitTestInitLocalTests+TestObj"); list.Add(type); name = ((Type)list[i]).Name; - Assert.Equal(name, "TestObj"); + Assert.AreEqual(name, "TestObj"); i++; Type iface = type.GetInterfaces()[0]; list.Add(iface); name = ((Type)list[i]).Name; - Assert.Equal(name, "IEmptyInterface"); - Assert.Equal(iface.Name, "IEmptyInterface"); + Assert.AreEqual(name, "IEmptyInterface"); + Assert.AreEqual(iface.Name, "IEmptyInterface"); i++; FieldInfo fi = type.GetField("Field1"); list.Add(fi); name = ((FieldInfo)list[i]).Name; - Assert.Equal(name, "Field1"); - Assert.Equal(fi.Name, "Field1"); + Assert.AreEqual(name, "Field1"); + Assert.AreEqual(fi.Name, "Field1"); i++; MethodInfo mi = type.GetMethod("Method1"); list.Add(mi); name = ((MethodInfo)list[i]).Name; - Assert.Equal(name, "Method1"); - Assert.Equal(mi.Name, "Method1"); + Assert.AreEqual(name, "Method1"); + Assert.AreEqual(mi.Name, "Method1"); i++; ConstructorInfo ci = type.GetConstructor(new Type[] { }); list.Add(ci); name = ((ConstructorInfo)list[i]).Name; - Assert.Equal(name, ".ctor"); - Assert.Equal(ci.Name, ".ctor"); + Assert.AreEqual(name, ".ctor"); + Assert.AreEqual(ci.Name, ".ctor"); i++; // @@ -112,8 +112,8 @@ public void SystemType1_GetType_Test() Type[] types = new Type[] { typeof(int), typeof(bool), Type.GetType("NFUnitTestSystemLib.UnitTestInitLocalTests+TestObj") }; list.Add(types[2]); name = ((Type)list[i]).Name; - Assert.Equal(name, "TestObj"); - Assert.Equal(types[2].Name, "TestObj"); + Assert.AreEqual(name, "TestObj"); + Assert.AreEqual(types[2].Name, "TestObj"); i++; //AppDomain[] domains = new AppDomain[] { AppDomain.CurrentDomain, AppDomain.CreateDomain("blah") }; @@ -134,22 +134,22 @@ public void SystemType1_GetType_Test() FieldInfo[] fis = new FieldInfo[] { types[2].GetField("Field1"), type.GetFields()[0] }; list.Add(fis[0]); name = ((FieldInfo)list[i]).Name; - Assert.Equal(name, "Field1"); - Assert.Equal(fis[0].Name, "Field1"); + Assert.AreEqual(name, "Field1"); + Assert.AreEqual(fis[0].Name, "Field1"); i++; MethodInfo[] mis = new MethodInfo[] { type.GetMethods()[2], types[2].GetMethod("Method2", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public) }; list.Add(mis[1]); name = ((MethodInfo)list[i]).Name; - Assert.Equal(name, "Method2"); - Assert.Equal(mis[1].Name, "Method2"); + Assert.AreEqual(name, "Method2"); + Assert.AreEqual(mis[1].Name, "Method2"); i++; ConstructorInfo[] cis = new ConstructorInfo[] { types[2].GetConstructor(new Type[] { }), typeof(TestObj).GetConstructor(new Type[] { typeof(int) }) }; list.Add(cis[0]); name = ((ConstructorInfo)list[i]).Name; - Assert.Equal(name, ".ctor"); - Assert.Equal(cis[0].Name, ".ctor"); + Assert.AreEqual(name, ".ctor"); + Assert.AreEqual(cis[0].Name, ".ctor"); i++; Array ar = Array.CreateInstance(typeof(Type), 3); @@ -158,9 +158,9 @@ public void SystemType1_GetType_Test() list.Add(ar.GetValue(1)); name = ((Type)list[i]).Name; - Assert.Equal(name, "ArrayList"); - Assert.Equal(((Type)((IList)ar)[0]).Name, "Type"); - Assert.Equal(((Type)ar.GetValue(1)).Name, "ArrayList"); + Assert.AreEqual(name, "ArrayList"); + Assert.AreEqual(((Type)((IList)ar)[0]).Name, "Type"); + Assert.AreEqual(((Type)ar.GetValue(1)).Name, "ArrayList"); i++; list.Clear(); @@ -180,13 +180,13 @@ public void SystemType1_StructArrayInit_Test() { // test to make sure boxing (to call struct method) // still works properly - Assert.True(Guid.Empty.Equals(g2)); + Assert.IsTrue(Guid.Empty.Equals(g2)); } data = new Guid[] { ReturnGuid(), Guid.NewGuid(), new Guid(344, 45, 24, 24, 4, 42, 42, 4, 44, 22, 4) }; foreach (Guid g2 in data) { - Assert.False(Guid.Empty.Equals(g2)); + Assert.IsFalse(Guid.Empty.Equals(g2)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestInt16.cs b/Tests/NFUnitTestSystemLib/UnitTestInt16.cs index f3124772..f4bb464e 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestInt16.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestInt16.cs @@ -15,26 +15,26 @@ public class Int16Tests public void Ctor_Empty() { var i = new short(); - Assert.Equal((short)0, i); + Assert.AreEqual((short)0, i); } [TestMethod] public void Ctor_Value() { short i = 41; - Assert.Equal((short)41, i); + Assert.AreEqual((short)41, i); } [TestMethod] public void MaxValue() { - Assert.Equal((short)0x7FFF, short.MaxValue); + Assert.AreEqual((short)0x7FFF, short.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal(unchecked((short)0x8000), short.MinValue); + Assert.AreEqual(unchecked((short)0x8000), short.MinValue); } [TestMethod] @@ -58,11 +58,11 @@ public void Equals() if (test.Obj is short) { short i2 = (short)test.Obj; - Assert.Equal(test.Expected, test.I1.Equals(i2)); - Assert.Equal(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); + Assert.AreEqual(test.Expected, test.I1.Equals(i2)); + Assert.AreEqual(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); } - Assert.Equal(test.Expected, test.I1.Equals(test.Obj)); + Assert.AreEqual(test.Expected, test.I1.Equals(test.Obj)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestInt32.cs b/Tests/NFUnitTestSystemLib/UnitTestInt32.cs index 5a17eb2e..cfaff43a 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestInt32.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestInt32.cs @@ -15,26 +15,26 @@ public class Int32Tests public void Ctor_Empty() { var i = new int(); - Assert.Equal(0, i); + Assert.AreEqual(0, i); } [TestMethod] public void Ctor_Value() { int i = 41; - Assert.Equal(41, i); + Assert.AreEqual(41, i); } [TestMethod] public void MaxValue() { - Assert.Equal(0x7FFFFFFF, int.MaxValue); + Assert.AreEqual(0x7FFFFFFF, int.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal(unchecked((int)0x80000000), int.MinValue); + Assert.AreEqual(unchecked((int)0x80000000), int.MinValue); } [TestMethod] @@ -57,11 +57,11 @@ public void Equals() if (test.Obj is int) { int i2 = (int)test.Obj; - Assert.Equal(test.Expected, test.I1.Equals(i2)); - Assert.Equal(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); + Assert.AreEqual(test.Expected, test.I1.Equals(i2)); + Assert.AreEqual(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); } - Assert.Equal(test.Expected, test.I1.Equals(test.Obj)); + Assert.AreEqual(test.Expected, test.I1.Equals(test.Obj)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestInt64.cs b/Tests/NFUnitTestSystemLib/UnitTestInt64.cs index 0df5eef7..bbaee5e4 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestInt64.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestInt64.cs @@ -15,26 +15,26 @@ public class Int64Tests public void Ctor_Empty() { var i = new long(); - Assert.Equal(0, i); + Assert.AreEqual(0, i); } [TestMethod] public void Ctor_Value() { long i = 41; - Assert.Equal(41, i); + Assert.AreEqual(41, i); } [TestMethod] public void MaxValue() { - Assert.Equal(0x7FFFFFFFFFFFFFFF, long.MaxValue); + Assert.AreEqual(0x7FFFFFFFFFFFFFFF, long.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal(unchecked((long)0x8000000000000000), long.MinValue); + Assert.AreEqual(unchecked((long)0x8000000000000000), long.MinValue); } [TestMethod] @@ -57,11 +57,11 @@ public void Equals() if (test.Obj is long) { long i2 = (long)test.Obj; - Assert.Equal(test.Expected, test.I1.Equals(i2)); - Assert.Equal(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); + Assert.AreEqual(test.Expected, test.I1.Equals(i2)); + Assert.AreEqual(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); } - Assert.Equal(test.Expected, test.I1.Equals(test.Obj)); + Assert.AreEqual(test.Expected, test.I1.Equals(test.Obj)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestParseTests.cs b/Tests/NFUnitTestSystemLib/UnitTestParseTests.cs index ea77f99d..c7968b5d 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestParseTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestParseTests.cs @@ -76,7 +76,7 @@ public static string[] GetRandomStringArray(int max, bool signed) }; // sanity check for when the test arrays above change - Assert.Equal(_intArr.Length, 2 * arr1.Length); + Assert.AreEqual(_intArr.Length, 2 * arr1.Length); for (int i = 0; i < arr2.Length; i++) { @@ -115,10 +115,10 @@ public void ParseSByte_Test_1() for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(sbyte.Parse(strArr[i]), _sByte[i]); + Assert.AreEqual(sbyte.Parse(strArr[i]), _sByte[i]); - Assert.True(sbyte.TryParse(strArr[i], out sbyte result), $"TryParse failed for {strArr[i]} expecting: {_sByte[i]}"); - Assert.Equal(_sByte[i], result); + Assert.IsTrue(sbyte.TryParse(strArr[i], out sbyte result), $"TryParse failed for {strArr[i]} expecting: {_sByte[i]}"); + Assert.AreEqual(_sByte[i], result); } } @@ -138,10 +138,10 @@ public void ParseByte_Test_2() for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(byte.Parse(strArr[i]), _byte[i], $"Parse failed for {strArr[i]}, expecting: {_byte[i]}"); + Assert.AreEqual(byte.Parse(strArr[i]), _byte[i], $"Parse failed for {strArr[i]}, expecting: {_byte[i]}"); - Assert.True(byte.TryParse(strArr[i], out byte result), $"TryParse failed for {strArr[i]} expecting: {_byte[i]}"); - Assert.Equal(_byte[i], result); + Assert.IsTrue(byte.TryParse(strArr[i], out byte result), $"TryParse failed for {strArr[i]} expecting: {_byte[i]}"); + Assert.AreEqual(_byte[i], result); } } @@ -160,10 +160,10 @@ public void ParseInt16_Test_3() for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(short.Parse(strArr[i]), _int16[i]); + Assert.AreEqual(short.Parse(strArr[i]), _int16[i]); - Assert.True(short.TryParse(strArr[i], out short result), $"TryParse failed for {strArr[i]} expecting: {_int16[i]}"); - Assert.Equal(_int16[i], result); + Assert.IsTrue(short.TryParse(strArr[i], out short result), $"TryParse failed for {strArr[i]} expecting: {_int16[i]}"); + Assert.AreEqual(_int16[i], result); } } @@ -183,10 +183,10 @@ public void ParseUInt16_Test_4() for (int i = 0; i < strArr.Length; i++) { - Assert.True(ushort.TryParse(strArr[i], out ushort result), $"TryParse failed for {strArr[i]} expecting: {_uInt16[i]}"); - Assert.Equal(_uInt16[i], result); + Assert.IsTrue(ushort.TryParse(strArr[i], out ushort result), $"TryParse failed for {strArr[i]} expecting: {_uInt16[i]}"); + Assert.AreEqual(_uInt16[i], result); - Assert.Equal(ushort.Parse(strArr[i]), _uInt16[i]); + Assert.AreEqual(ushort.Parse(strArr[i]), _uInt16[i]); } } @@ -205,10 +205,10 @@ public void ParseInt32_Test_5() for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(int.Parse(strArr[i]), _int32[i]); + Assert.AreEqual(int.Parse(strArr[i]), _int32[i]); - Assert.True(int.TryParse(strArr[i], out int result), $"TryParse failed for {strArr[i]} expecting: {_int32[i]}"); - Assert.Equal(_int32[i], result); + Assert.IsTrue(int.TryParse(strArr[i], out int result), $"TryParse failed for {strArr[i]} expecting: {_int32[i]}"); + Assert.AreEqual(_int32[i], result); } } @@ -247,10 +247,10 @@ public void ParseUInt32_Test_6() for (int i = 0; i < strArr.Length; i++) { - Assert.True(uint.TryParse(strArr[i], out uint result), $"TryParse failed for {strArr[i]} expecting: {_uInt32[i]}"); - Assert.Equal(_uInt32[i], result); + Assert.IsTrue(uint.TryParse(strArr[i], out uint result), $"TryParse failed for {strArr[i]} expecting: {_uInt32[i]}"); + Assert.AreEqual(_uInt32[i], result); - Assert.Equal(uint.Parse(strArr[i]), _uInt32[i]); + Assert.AreEqual(uint.Parse(strArr[i]), _uInt32[i]); } } @@ -284,10 +284,10 @@ public void ParseInt64_Test_7() for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(long.Parse(strArr[i]), _int64[i]); + Assert.AreEqual(long.Parse(strArr[i]), _int64[i]); - Assert.True(long.TryParse(strArr[i], out long result), $"TryParse failed for {strArr[i]} expecting: {_int64[i]}"); - Assert.Equal(_int64[i], result); + Assert.IsTrue(long.TryParse(strArr[i], out long result), $"TryParse failed for {strArr[i]} expecting: {_int64[i]}"); + Assert.AreEqual(_int64[i], result); } //Int32: -2147483648 --> 2147483647 @@ -315,7 +315,7 @@ private void CheckValues(long start) { temp = i.ToString(); newVal = long.Parse(temp); - Assert.Equal(i, newVal); + Assert.AreEqual(i, newVal); } } @@ -342,11 +342,11 @@ public void ParseUInt64_Test_8() for (int i = 0; i < strArr.Length; i++) { - Assert.True(ulong.TryParse(strArr[i], out ulong result), $"TryParse failed for {strArr[i]} expecting: {_uInt64[i]}"); - Assert.Equal(_uInt64[i], result); + Assert.IsTrue(ulong.TryParse(strArr[i], out ulong result), $"TryParse failed for {strArr[i]} expecting: {_uInt64[i]}"); + Assert.AreEqual(_uInt64[i], result); result = ulong.Parse(strArr[i]); - Assert.Equal(result, _uInt64[i]); + Assert.AreEqual(result, _uInt64[i]); } //Int32: -2147483648 --> 2147483647 @@ -514,11 +514,11 @@ public void ParseDouble_Test_Invalid_Values() { OutputHelper.WriteLine($"parse {strArr[i]}"); - Assert.Throws(typeof(FormatException), + Assert.ThrowsException(typeof(FormatException), () => { double.Parse(strArr[i]); }, $"Should throw exception of type FormatExeception while parsing string: '{strArr[i]}'"); - Assert.False(double.TryParse(strArr[i], out double _), $"TryParse should return false while parsing string: '{strArr[i]}'"); + Assert.IsFalse(double.TryParse(strArr[i], out double _), $"TryParse should return false while parsing string: '{strArr[i]}'"); } } @@ -527,10 +527,10 @@ public void ParseDouble_OverflowTests() { // Note we have to check hex values - again, the ToString() works over a subset of the range for double/float, and returns 'oor' or '-oor' for anything outside that range string t = "-1.7976931348623180E+320"; - Assert.Equal(double.NegativeInfinity, double.Parse(t), "High negative values should return double.NegativeInfinity value when parsed"); + Assert.AreEqual(double.NegativeInfinity, double.Parse(t), "High negative values should return double.NegativeInfinity value when parsed"); t = "1.7976931348623180E+308"; - Assert.Equal(double.PositiveInfinity, double.Parse(t), "High positive values should return double.PositiveInfinity value when parsed"); + Assert.AreEqual(double.PositiveInfinity, double.Parse(t), "High positive values should return double.PositiveInfinity value when parsed"); } [TestMethod] @@ -606,51 +606,51 @@ public void ParseFloat_Test_Valid_Values() Assert.AreEqual(float.Parse(strArr[i]), _float[i], $"Failed while parsing string: {strArr[i]} expecting: {_float[i]}"); Assert.IsTrue(float.TryParse(strArr[i], out result), $"TryParse failed for {strArr[i]} expecting: {_float[i]}"); - Assert. Equal(_float[i], result); + Assert.AreEqual(_float[i], result); } float f = float.Parse("-0.1"); Assert.AreEqual(f, -0.1f); - Assert.True(float.TryParse("-0.1", out result), $"TryParse failed for -0.1 expecting: {f}"); - Assert. Equal(-0.1f, result); + Assert.IsTrue(float.TryParse("-0.1", out result), $"TryParse failed for -0.1 expecting: {f}"); + Assert.AreEqual(-0.1f, result); f = float.Parse("0.1"); Assert.AreEqual(f, 0.1f); Assert.IsTrue(float.TryParse("0.1", out result), $"TryParse failed for 0.1 expecting: {f}"); - Assert. Equal(0.1f, result); + Assert.AreEqual(0.1f, result); f = float.Parse(" -1.1"); - Assert.Equal(f, -1.1f); + Assert.AreEqual(f, -1.1f); - Assert.True(float.TryParse(" -1.1", out result), $"TryParse failed for -1.1 expecting: {f}"); - Assert.Equal(-1.1f, result); + Assert.IsTrue(float.TryParse(" -1.1", out result), $"TryParse failed for -1.1 expecting: {f}"); + Assert.AreEqual(-1.1f, result); f = float.Parse(" -0.0001"); Assert.AreEqual(f, -0.0001f); - Assert. True(float.TryParse(" -0.0001", out result), $"TryParse failed for -0.0001 expecting: {f}"); - Assert. Equal(-0.0001f, result); + Assert.IsTrue(float.TryParse(" -0.0001", out result), $"TryParse failed for -0.0001 expecting: {f}"); + Assert.AreEqual(-0.0001f, result); f = float.Parse(" -10.0001"); - Assert.Equal(f, -10.0001f); + Assert.AreEqual(f, -10.0001f); Assert.IsTrue(float.TryParse(" -10.0001", out result), $"TryParse failed for -10.0001 expecting: {f}"); - Assert. Equal(-10.0001f, result); + Assert.AreEqual(-10.0001f, result); f = float.Parse("-0.01e-10"); Assert.AreEqual(f, -0.01e-10f); - Assert. True(float.TryParse("-0.01e-10", out result), $"TryParse failed for -0.01e-10 expecting: {f}"); - Assert. Equal(-0.01e-10f, result); + Assert.IsTrue(float.TryParse("-0.01e-10", out result), $"TryParse failed for -0.01e-10 expecting: {f}"); + Assert.AreEqual(-0.01e-10f, result); // can't use Min/MaxValue.ToString() because the fast float-to-string routine only works in the range 2^64 to 2^-64 (there-about). string t = "-3.40282347E+38"; // float.MinValue Assert.AreEqual(float.MinValue, float.Parse(t), "Testing float min value parse"); t = "3.40282347E+38"; // float.MaxValue - Assert. Equal(float.MaxValue, float.Parse(t), "Testing float max value parse"); + Assert.AreEqual(float.MaxValue, float.Parse(t), "Testing float max value parse"); } [TestMethod] @@ -683,11 +683,11 @@ public void ParseFloat_Test_Invalid_Values() { OutputHelper.WriteLine($"parse {strArr[i]}"); - Assert.Throws(typeof(FormatException), + Assert.ThrowsException(typeof(FormatException), () => { float.Parse(strArr[i]); }, $"Should throw exception of type FormatExeception while parsing string: '{strArr[i]}'"); - Assert.False(float.TryParse(strArr[i], out float _), $"TryParse should return false while parsing string: '{strArr[i]}'"); + Assert.IsFalse(float.TryParse(strArr[i], out float _), $"TryParse should return false while parsing string: '{strArr[i]}'"); } } @@ -696,10 +696,10 @@ public void ParseFloat_OverflowTests() { // Note we have to check hex values - again, the ToString() works over a subset of the range for double/float, and returns 'oor' or '-oor' for anything outside that range string t = "-3.40282380E+38"; - Assert.Equal(float.NegativeInfinity, float.Parse(t), "High negative values should return float.NegativeInfinity value when parsed"); + Assert.AreEqual(float.NegativeInfinity, float.Parse(t), "High negative values should return float.NegativeInfinity value when parsed"); t = "3.40282380E+38"; - Assert.Equal(float.PositiveInfinity, float.Parse(t), "High positive values should return float.PositiveInfinity value when parsed"); + Assert.AreEqual(float.PositiveInfinity, float.Parse(t), "High positive values should return float.PositiveInfinity value when parsed"); } private void CheckUValues(ulong start) @@ -708,10 +708,10 @@ private void CheckUValues(ulong start) { ulong newVal = ulong.Parse(i.ToString()); - Assert.True(ulong.TryParse(i.ToString(), out ulong result), $"TryParse failed for {i.ToString()} expecting: {newVal}"); - Assert.Equal(newVal, result); + Assert.IsTrue(ulong.TryParse(i.ToString(), out ulong result), $"TryParse failed for {i.ToString()} expecting: {newVal}"); + Assert.AreEqual(newVal, result); - Assert.Equal(i, newVal); + Assert.AreEqual(i, newVal); } } @@ -727,10 +727,10 @@ public void SByte_Boundary_Test_9() sbyte[] _SByte = new sbyte[] { 127, 127, -128, -128 }; for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(sbyte.Parse(strArr[i]), _SByte[i]); + Assert.AreEqual(sbyte.Parse(strArr[i]), _SByte[i]); - Assert.True(sbyte.TryParse(strArr[i], out sbyte result), $"TryParse failed for {strArr[i]} expecting: {_SByte[i]}"); - Assert.Equal(_SByte[i], result); + Assert.IsTrue(sbyte.TryParse(strArr[i], out sbyte result), $"TryParse failed for {strArr[i]} expecting: {_SByte[i]}"); + Assert.AreEqual(_SByte[i], result); } } @@ -742,10 +742,10 @@ public void Byte_Boundary_Test_10() for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(byte.Parse(strArr[i]), _byte[i]); + Assert.AreEqual(byte.Parse(strArr[i]), _byte[i]); - Assert.True(byte.TryParse(strArr[i], out byte result), $"TryParse failed for {strArr[i]} expecting: {_byte[i]}"); - Assert.Equal(_byte[i], result); + Assert.IsTrue(byte.TryParse(strArr[i], out byte result), $"TryParse failed for {strArr[i]} expecting: {_byte[i]}"); + Assert.AreEqual(_byte[i], result); } } @@ -757,10 +757,10 @@ public void Int16_Boundary_Test_11() for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(short.Parse(strArr[i]), _int16[i]); + Assert.AreEqual(short.Parse(strArr[i]), _int16[i]); - Assert.True(short.TryParse(strArr[i], out short result), $"TryParse failed for {strArr[i]} expecting: {_int16[i]}"); - Assert.Equal(_int16[i], result); + Assert.IsTrue(short.TryParse(strArr[i], out short result), $"TryParse failed for {strArr[i]} expecting: {_int16[i]}"); + Assert.AreEqual(_int16[i], result); } } @@ -772,10 +772,10 @@ public void UInt16_Boundary_Test_12() for (int i = 0; i < strArr.Length; i++) { - Assert.True(ushort.TryParse(strArr[i], out ushort result), $"TryParse failed for {strArr[i]} expecting: {_uInt16[i]}"); - Assert.Equal(_uInt16[i], result); + Assert.IsTrue(ushort.TryParse(strArr[i], out ushort result), $"TryParse failed for {strArr[i]} expecting: {_uInt16[i]}"); + Assert.AreEqual(_uInt16[i], result); - Assert.Equal(ushort.Parse(strArr[i]), _uInt16[i]); + Assert.AreEqual(ushort.Parse(strArr[i]), _uInt16[i]); } } @@ -786,10 +786,10 @@ public void Int32_Boundary_Test_13() int[] _int32 = new int[] { 2147483647, 2147483647, -2147483648, -2147483648 }; for (int i = 0; i < strArr.Length; i++) { - Assert.Equal(int.Parse(strArr[i]), _int32[i]); + Assert.AreEqual(int.Parse(strArr[i]), _int32[i]); - Assert.True(int.TryParse(strArr[i], out int result), $"TryParse failed for {strArr[i]} expecting: {_int32[i]}"); - Assert.Equal(_int32[i], result); + Assert.IsTrue(int.TryParse(strArr[i], out int result), $"TryParse failed for {strArr[i]} expecting: {_int32[i]}"); + Assert.AreEqual(_int32[i], result); } } @@ -800,10 +800,10 @@ public void UInt32_Boundary_Test_14() uint[] _uInt32 = new uint[] { 4294967295, 4294967295, 0, 0 }; for (int i = 0; i < strArr.Length; i++) { - Assert.True(uint.TryParse(strArr[i], out uint result), $"TryParse failed for {strArr[i]} expecting: {_uInt32[i]}"); - Assert.Equal(_uInt32[i], result); + Assert.IsTrue(uint.TryParse(strArr[i], out uint result), $"TryParse failed for {strArr[i]} expecting: {_uInt32[i]}"); + Assert.AreEqual(_uInt32[i], result); - Assert.Equal(uint.Parse(strArr[i]), _uInt32[i]); + Assert.AreEqual(uint.Parse(strArr[i]), _uInt32[i]); } } @@ -816,7 +816,7 @@ public void Int64_Boundary_Test_15() for (int i = 0; i < strArr.Length; i++) { temp = long.Parse(strArr[i]); - Assert.Equal(temp, _int64[i]); + Assert.AreEqual(temp, _int64[i]); } } @@ -829,7 +829,7 @@ public void UInt64_Boundary_Test_16() for (int i = 0; i < strArr.Length; i++) { temp = ulong.Parse(strArr[i]); - Assert.Equal(temp, _uInt64[i]); + Assert.AreEqual(temp, _uInt64[i]); } } @@ -841,97 +841,97 @@ public void UInt64_Boundary_Test_16() [TestMethod] public void SByte_ArgumentNullException_Test_17() { - Assert.Throws(typeof(ArgumentNullException), () => { sbyte.Parse(str); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { sbyte.Parse(str); }); } [TestMethod] public void SByte_TryParse_Test() { - Assert.False(sbyte.TryParse(str, out sbyte _)); + Assert.IsFalse(sbyte.TryParse(str, out sbyte _)); } [TestMethod] public void Byte_ArgumentNullException_Test_18() { - Assert.Throws(typeof(ArgumentNullException), () => { byte.Parse(str); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { byte.Parse(str); }); } [TestMethod] public void Byte_TryParse_Test() { - Assert.False(byte.TryParse(str, out byte _)); + Assert.IsFalse(byte.TryParse(str, out byte _)); } [TestMethod] public void Int16_ArgumentNullException_Test_19() { - Assert.Throws(typeof(ArgumentNullException), () => { short.Parse(str); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { short.Parse(str); }); } [TestMethod] public void Int16_TryParse_Test() { - Assert.False(short.TryParse(str, out short _)); + Assert.IsFalse(short.TryParse(str, out short _)); } [TestMethod] public void UInt16_ArgumentNullException_Test_20() { - Assert.Throws(typeof(ArgumentNullException), () => { ushort.Parse(str); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { ushort.Parse(str); }); } [TestMethod] public void UInt16_TryParse_Test() { - Assert.False(ushort.TryParse(str, out ushort _)); + Assert.IsFalse(ushort.TryParse(str, out ushort _)); } [TestMethod] public void Int32_ArgumentNullException_Test_21() { - Assert.Throws(typeof(ArgumentNullException), () => { int.Parse(str); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { int.Parse(str); }); } [TestMethod] public void Int32_TryParse_Test() { - Assert.False(int.TryParse(str, out int _)); + Assert.IsFalse(int.TryParse(str, out int _)); } [TestMethod] public void UInt32_ArgumentNullException_Test_22() { - Assert.Throws(typeof(ArgumentNullException), () => { uint.Parse(str); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { uint.Parse(str); }); } [TestMethod] public void UInt32_TryParse_Test() { - Assert.False(uint.TryParse(str, out uint _)); + Assert.IsFalse(uint.TryParse(str, out uint _)); } [TestMethod] public void Int64_ArgumentNullException_Test_23() { - Assert.Throws(typeof(ArgumentNullException), () => { long.Parse(str); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { long.Parse(str); }); } [TestMethod] public void Int64_TryParse_Test() { - Assert.False(long.TryParse(str, out long _)); + Assert.IsFalse(long.TryParse(str, out long _)); } [TestMethod] public void UInt64_ArgumentNullException_Test_24() { - Assert.Throws(typeof(ArgumentNullException), () => { ulong.Parse(str); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { ulong.Parse(str); }); } [TestMethod] public void UInt64_TryParse_Test() { - Assert.False(ulong.TryParse(str, out ulong _)); + Assert.IsFalse(ulong.TryParse(str, out ulong _)); } /// @@ -978,17 +978,17 @@ public void ParseSByte_FormatException_Test_25() string[] strArr = new string[] { "", "1,234", "123e5", "a", "3.14159265358979" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(FormatException), () => { _ = sbyte.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = sbyte.Parse(strArr[i]); }); - Assert.False(sbyte.TryParse(strArr[i], out _)); + Assert.IsFalse(sbyte.TryParse(strArr[i], out _)); } for (int i = 0; i < 5; i++) { string rdmString = GetRandomString(); - Assert.Throws(typeof(FormatException), () => { _ = sbyte.Parse(rdmString); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = sbyte.Parse(rdmString); }); - Assert.False(sbyte.TryParse(rdmString, out _)); + Assert.IsFalse(sbyte.TryParse(rdmString, out _)); } } @@ -998,18 +998,18 @@ public void ParseByte_FormatException_Test_26() string[] strArr = new string[] { "", "1,234", "123e5", "a", "3.14159265358979" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(FormatException), () => { _ = byte.Parse(strArr[i]); }, $"Value '{strArr[i]}' did not throw exception of type FormatException"); + Assert.ThrowsException(typeof(FormatException), () => { _ = byte.Parse(strArr[i]); }, $"Value '{strArr[i]}' did not throw exception of type FormatException"); - Assert.False(byte.TryParse(strArr[i], out _)); + Assert.IsFalse(byte.TryParse(strArr[i], out _)); } for (int i = 0; i < 5; i++) { string rdmString = GetRandomString(); - Assert.Throws(typeof(FormatException), () => { _ = byte.Parse(rdmString); }, $"Random string '{rdmString}' did not throw exception of FormatException"); + Assert.ThrowsException(typeof(FormatException), () => { _ = byte.Parse(rdmString); }, $"Random string '{rdmString}' did not throw exception of FormatException"); - Assert.False(byte.TryParse(rdmString, out _)); + Assert.IsFalse(byte.TryParse(rdmString, out _)); } } @@ -1019,17 +1019,17 @@ public void ParseInt16_FormatException_Test_27() string[] strArr = new string[] { "", "1,234", "123e5", "a", "3.14159265358979" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(FormatException), () => { _ = short.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = short.Parse(strArr[i]); }); - Assert.False(short.TryParse(strArr[i], out _)); + Assert.IsFalse(short.TryParse(strArr[i], out _)); } for (int i = 0; i < 5; i++) { string rdmString = GetRandomString(); - Assert.Throws(typeof(FormatException), () => { _ = short.Parse(rdmString); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = short.Parse(rdmString); }); - Assert.False(short.TryParse(rdmString, out _)); + Assert.IsFalse(short.TryParse(rdmString, out _)); } } @@ -1039,17 +1039,17 @@ public void ParseUInt16_FormatException_Test_28() string[] strArr = new string[] { "", "1,234", "123e5", "a", "3.14159265358979" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(FormatException), () => { _ = ushort.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = ushort.Parse(strArr[i]); }); - Assert.False(ushort.TryParse(strArr[i], out _)); + Assert.IsFalse(ushort.TryParse(strArr[i], out _)); } for (int i = 0; i < 5; i++) { string rdmString = GetRandomString(); - Assert.Throws(typeof(FormatException), () => { _ = ushort.Parse(rdmString); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = ushort.Parse(rdmString); }); - Assert.False(ushort.TryParse(rdmString, out _)); + Assert.IsFalse(ushort.TryParse(rdmString, out _)); } } @@ -1059,17 +1059,17 @@ public void ParseInt32_FormatException_Test_29() string[] strArr = new string[] { "", "1,234", "123e5", "a", "3.14159265358979" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(FormatException), () => { _ = int.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = int.Parse(strArr[i]); }); - Assert.False(int.TryParse(strArr[i], out _)); + Assert.IsFalse(int.TryParse(strArr[i], out _)); } for (int i = 0; i < 5; i++) { string rdmString = GetRandomString(); - Assert.Throws(typeof(FormatException), () => { _ = int.Parse(rdmString); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = int.Parse(rdmString); }); - Assert.False(int.TryParse(rdmString, out _)); + Assert.IsFalse(int.TryParse(rdmString, out _)); } } @@ -1079,17 +1079,17 @@ public void ParseUInt32_FormatException_Test_30() string[] strArr = new string[] { "", "1,234", "123e5", "a", "3.14159265358979" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(FormatException), () => { _ = uint.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = uint.Parse(strArr[i]); }); - Assert.False(uint.TryParse(strArr[i], out _)); + Assert.IsFalse(uint.TryParse(strArr[i], out _)); } for (int i = 0; i < 5; i++) { string rdmString = GetRandomString(); - Assert.Throws(typeof(FormatException), () => { _ = uint.Parse(rdmString); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = uint.Parse(rdmString); }); - Assert.False(uint.TryParse(rdmString, out _)); + Assert.IsFalse(uint.TryParse(rdmString, out _)); } } @@ -1099,17 +1099,17 @@ public void ParseInt64_FormatException_Test_31() string[] strArr = new string[] { "", "1,234", "123e5", "a", "3.14159265358979" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(FormatException), () => { _ = long.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = long.Parse(strArr[i]); }); - Assert.False(long.TryParse(strArr[i], out _)); + Assert.IsFalse(long.TryParse(strArr[i], out _)); } for (int i = 0; i < 5; i++) { string rdmString = GetRandomString(); - Assert.Throws(typeof(FormatException), () => { _ = long.Parse(rdmString); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = long.Parse(rdmString); }); - Assert.False(long.TryParse(rdmString, out _)); + Assert.IsFalse(long.TryParse(rdmString, out _)); } } @@ -1119,17 +1119,17 @@ public void ParseUInt64_FormatException_Test_32() string[] strArr = new string[] { "", "1,234", "123e5", "a", "3.14159265358979" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(FormatException), () => { _ = ulong.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = ulong.Parse(strArr[i]); }); - Assert.False(ulong.TryParse(strArr[i], out _)); + Assert.IsFalse(ulong.TryParse(strArr[i], out _)); } for (int i = 0; i < 5; i++) { string rdmString = GetRandomString(); - Assert.Throws(typeof(FormatException), () => { _ = ulong.Parse(rdmString); }); + Assert.ThrowsException(typeof(FormatException), () => { _ = ulong.Parse(rdmString); }); - Assert.False(ulong.TryParse(rdmString, out _)); + Assert.IsFalse(ulong.TryParse(rdmString, out _)); } } @@ -1145,9 +1145,9 @@ public void ParseSByte_OverflowException_Test_33() ((long)sbyte.MaxValue + 1).ToString(), ((long)sbyte.MaxValue + 100).ToString() }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { _ = sbyte.Parse(strArr[i]); }, $"The value '{strArr[i]}' did not produce an exception type of ArgumentOutOfRange"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { _ = sbyte.Parse(strArr[i]); }, $"The value '{strArr[i]}' did not produce an exception type of ArgumentOutOfRange"); - Assert.False(sbyte.TryParse(strArr[i], out _)); + Assert.IsFalse(sbyte.TryParse(strArr[i], out _)); } } @@ -1158,9 +1158,9 @@ public void ParseByte_OverflowException_Test_34() ((long)byte.MaxValue + 1).ToString(), ((long)byte.MaxValue + 100).ToString() }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { _ = byte.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { _ = byte.Parse(strArr[i]); }); - Assert.False(byte.TryParse(strArr[i], out _)); + Assert.IsFalse(byte.TryParse(strArr[i], out _)); } } @@ -1171,9 +1171,9 @@ public void ParseInt16_OverflowException_Test_35() ((long)short.MaxValue + 1).ToString(), ((long)short.MaxValue + 100).ToString() }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { _ = short.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { _ = short.Parse(strArr[i]); }); - Assert.False(short.TryParse(strArr[i], out _)); + Assert.IsFalse(short.TryParse(strArr[i], out _)); } } @@ -1184,9 +1184,9 @@ public void ParseUInt16_OverflowException_Test_36() ((long)ushort.MaxValue + 1).ToString(), ((long)ushort.MaxValue + 100).ToString() }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { _ = ushort.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { _ = ushort.Parse(strArr[i]); }); - Assert.False(ushort.TryParse(strArr[i], out _)); + Assert.IsFalse(ushort.TryParse(strArr[i], out _)); } } @@ -1197,9 +1197,9 @@ public void ParseInt32_OverflowException_Test_37() ((long)int.MaxValue + 1).ToString(), ((long)int.MaxValue + 100).ToString() }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { _ = int.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { _ = int.Parse(strArr[i]); }); - Assert.False(int.TryParse(strArr[i], out _)); + Assert.IsFalse(int.TryParse(strArr[i], out _)); } } @@ -1210,9 +1210,9 @@ public void ParseUInt32_OverflowException_Test_38() ((long)uint.MaxValue + 1).ToString(), ((long)uint.MaxValue + 100).ToString() }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { _ = uint.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { _ = uint.Parse(strArr[i]); }); - Assert.False(uint.TryParse(strArr[i], out _)); + Assert.IsFalse(uint.TryParse(strArr[i], out _)); } } @@ -1224,9 +1224,9 @@ public void ParseInt64_OverflowException_Test_39() "9223372036854775808", "9223372036854775900" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { _ = long.Parse(strArr[i]); }, $"An exception of type ArgumentOutOfRangeException was not thrown when values was {strArr[i]}"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { _ = long.Parse(strArr[i]); }, $"An exception of type ArgumentOutOfRangeException was not thrown when values was {strArr[i]}"); - Assert.False(long.TryParse(strArr[i], out _)); + Assert.IsFalse(long.TryParse(strArr[i], out _)); } } @@ -1236,9 +1236,9 @@ public void ParseUInt64_OverflowException_Test_40() string[] strArr = new string[] { "-1", "-100", "18446744073709551616", "18446744073709551700" }; for (int i = 0; i < strArr.Length; i++) { - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { _ = ulong.Parse(strArr[i]); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { _ = ulong.Parse(strArr[i]); }); - Assert.False(ulong.TryParse(strArr[i], out _)); + Assert.IsFalse(ulong.TryParse(strArr[i], out _)); } } @@ -1249,20 +1249,20 @@ public void Cast_Double_to_int64_Test_40() // Convert to int and uint should keep the value long l_val = (long)dbVal; - Assert.Equal(l_val, dbVal); + Assert.AreEqual(l_val, dbVal); ulong ul_val = (ulong)dbVal; - Assert.Equal(ul_val, dbVal); + Assert.AreEqual(ul_val, dbVal); // Change sign to negative dbVal = -dbVal; l_val = (long)dbVal; - Assert.Equal(l_val, dbVal); + Assert.AreEqual(l_val, dbVal); ul_val = (ulong)dbVal; long ul_val_cast = (long)ul_val; - Assert.Equal(ul_val_cast, dbVal); + Assert.AreEqual(ul_val_cast, dbVal); } @@ -1292,42 +1292,42 @@ public void box_unbox_Test_1() MyEnum2 e2 = (MyEnum2)o_enum; // line 2 // Cast from enum to primitive type that enum is based on short sv = (short)o_enum; - Assert.Equal(sv, (short)MyEnum.Value); + Assert.AreEqual(sv, (short)MyEnum.Value); // Cast from enum to primitive type that enum is based on int iv = (int)o_enum1; - Assert.Equal(iv, (short)MyEnum1.Value); + Assert.AreEqual(iv, (short)MyEnum1.Value); int i_long = (int)(long)o_long; CastTestClass cls = (CastTestClass)o_class; Guid guid = (Guid)o_guid; // Now casts that should throw exception. Any cast that does not throw - means error. - Assert.Throws(typeof(InvalidCastException), () => + Assert.ThrowsException(typeof(InvalidCastException), () => { MyEnum1 e1 = (MyEnum1)o_enum; }, "Trying to cast incompatible enums - should throw InvalidCastException"); // Now casts that should throw exception. Any cast that does not throw - means error. - Assert.Throws(typeof(InvalidCastException), () => + Assert.ThrowsException(typeof(InvalidCastException), () => { int i = (int)o_long; }, "Trying to cast long to int - should throw InvalidCastException"); // Now casts that should throw exception. Any cast that does not throw - means error. - Assert.Throws(typeof(InvalidCastException), () => + Assert.ThrowsException(typeof(InvalidCastException), () => { int i = (int)o_class; }, "Trying to cast object to int - should throw InvalidCastException"); // Now casts that should throw exception. Any cast that does not throw - means error. - Assert.Throws(typeof(InvalidCastException), () => + Assert.ThrowsException(typeof(InvalidCastException), () => { int i = (int)o_enum; }, "Trying to cast enum to int - should throw InvalidCastException"); // Now casts that should throw exception. Any cast that does not throw - means error. - Assert.Throws(typeof(InvalidCastException), () => + Assert.ThrowsException(typeof(InvalidCastException), () => { int i = (int)o_guid; }, "Trying to cast Guid to int - should throw InvalidCastException"); diff --git a/Tests/NFUnitTestSystemLib/UnitTestReflectionAssemblyTest.cs b/Tests/NFUnitTestSystemLib/UnitTestReflectionAssemblyTest.cs index 64ffcf29..8be56104 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestReflectionAssemblyTest.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestReflectionAssemblyTest.cs @@ -27,13 +27,13 @@ public void AssemblyName_Test1() OutputHelper.WriteLine("Assembly FullNme from AssemblyName type is: \"" + fullNameFromAssemblyName + "\""); string nameParsedFromFullName = fullNameFromAssemblyName.Substring(0, fullNameFromAssemblyName.IndexOf(',')); - Assert.Equal(nameParsedFromFullName, name); + Assert.AreEqual(nameParsedFromFullName, name); // we will check that the FullName from Assembly and FullName from the AssemblyName class do match string fullName = assm.FullName; OutputHelper.WriteLine("Assembly FullName from Assembly type: \"" + fullName + "\""); - Assert.Equal(fullName, (name + ", Version=" + assm.GetName().Version.ToString())); + Assert.AreEqual(fullName, (name + ", Version=" + assm.GetName().Version.ToString())); } [TestMethod] @@ -41,7 +41,7 @@ public void AssemblyVersion_Test2() { // get the version Version ver = Assembly.GetExecutingAssembly().GetName().Version; - Assert.NotNull(ver); + Assert.IsNotNull(ver); } [TestMethod] @@ -51,19 +51,19 @@ public void AssemblyVersion_Test3() // get the version Assembly assm = Assembly.Load("mscorlib"); - Assert.NotNull(assm); + Assert.IsNotNull(assm); string v = assm.GetName().Version.ToString(); Assembly assm1 = Assembly.Load("mscorlib, Version=" + v); - Assert.NotNull(assm1); + Assert.IsNotNull(assm1); - Assert.Throws(typeof(ArgumentException), () => { Assembly assm2 = Assembly.Load("mscorlib, ,Version=" + v); }); + Assert.ThrowsException(typeof(ArgumentException), () => { Assembly assm2 = Assembly.Load("mscorlib, ,Version=" + v); }); // Test for extra parameters after assembly version. The assembly version parser needs to handle this // because the VS debugger will identify in CultureInfo and PublicKeyToken when debugging. assm = Assembly.Load("mscorlib, Version=" + v + ", CultureInfo=en, PublicKeyToken=null"); - Assert.NotNull(assm); + Assert.IsNotNull(assm); } [TestMethod] @@ -73,18 +73,18 @@ public void Assembly_GetAssemblies_Satellite_Test4() // Make sure satellite assembly can be retrieved Assembly res = asm.GetSatelliteAssembly(new System.Globalization.CultureInfo("en")); - Assert.NotNull(res); + Assert.IsNotNull(res); // Make sure we can get a known type from the target assembly Type t = asm.GetType("System.Int32"); - Assert.True(t.IsValueType); + Assert.IsTrue(t.IsValueType); // make sure all types from the assembly have proper // assembly property Type[] ts = asm.GetTypes(); for (int i = 0; i < ts.Length; i++) { - Assert.Equal(ts[i].Assembly.FullName, asm.FullName); + Assert.AreEqual(ts[i].Assembly.FullName, asm.FullName); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestReflectionMemberTest.cs b/Tests/NFUnitTestSystemLib/UnitTestReflectionMemberTest.cs index 36434cb6..96cc73b9 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestReflectionMemberTest.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestReflectionMemberTest.cs @@ -22,85 +22,85 @@ public void SystemReflectionMemberTests_Properties_Test0() /// Test the PropertyInfo class members /// MethodInfo mi = typeof(TestClass).GetMethod("BaseInternalProtectedMethod", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - Assert.False(mi.IsAbstract); - Assert.False(mi.IsFinal); - Assert.False(mi.IsPublic); - Assert.False(mi.IsStatic); - Assert.False(mi.IsVirtual); + Assert.IsFalse(mi.IsAbstract); + Assert.IsFalse(mi.IsFinal); + Assert.IsFalse(mi.IsPublic); + Assert.IsFalse(mi.IsStatic); + Assert.IsFalse(mi.IsVirtual); Assert.IsType(mi.ReturnType, typeof(object)); - Assert.True(mi.Invoke(tst, new object[] { 3 }) == null); + Assert.IsTrue(mi.Invoke(tst, new object[] { 3 }) == null); Assert.IsType(mi.DeclaringType, typeof(AbsTestClass)); mi = typeof(AbsTestClass).GetMethod("AbstractPublicMethod", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - Assert.True(mi.IsAbstract); - Assert.False(mi.IsFinal); - Assert.True(mi.IsPublic); - Assert.False(mi.IsStatic); - Assert.True(mi.IsVirtual); + Assert.IsTrue(mi.IsAbstract); + Assert.IsFalse(mi.IsFinal); + Assert.IsTrue(mi.IsPublic); + Assert.IsFalse(mi.IsStatic); + Assert.IsTrue(mi.IsVirtual); Assert.IsType(mi.ReturnType, typeof(float)); - Assert.True((float)mi.Invoke(tst, new object[] { 3 }) == 38.4f); + Assert.IsTrue((float)mi.Invoke(tst, new object[] { 3 }) == 38.4f); Assert.IsType(mi.DeclaringType, typeof(AbsTestClass)); mi = typeof(TestClass).GetMethod("VirtualInternalMethod", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - Assert.False(mi.IsAbstract); - Assert.False(mi.IsFinal); - Assert.False(mi.IsPublic); - Assert.False(mi.IsStatic); - Assert.True(mi.IsVirtual); + Assert.IsFalse(mi.IsAbstract); + Assert.IsFalse(mi.IsFinal); + Assert.IsFalse(mi.IsPublic); + Assert.IsFalse(mi.IsStatic); + Assert.IsTrue(mi.IsVirtual); Assert.IsType(mi.ReturnType, typeof(int)); - Assert.True((int)mi.Invoke(tst, new object[] { true }) == 34); + Assert.IsTrue((int)mi.Invoke(tst, new object[] { true }) == 34); Assert.IsType(mi.DeclaringType, typeof(TestClass)); mi = typeof(TestClass).GetMethod("SealedPublicMethod", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - Assert.False(mi.IsAbstract); - Assert.True(mi.IsFinal); - Assert.True(mi.IsPublic); - Assert.False(mi.IsStatic); - Assert.True(mi.IsVirtual); + Assert.IsFalse(mi.IsAbstract); + Assert.IsTrue(mi.IsFinal); + Assert.IsTrue(mi.IsPublic); + Assert.IsFalse(mi.IsStatic); + Assert.IsTrue(mi.IsVirtual); Assert.IsType(mi.ReturnType, typeof(bool)); - Assert.True((bool)mi.Invoke(tst, new object[] { })); + Assert.IsTrue((bool)mi.Invoke(tst, new object[] { })); Assert.IsType(mi.DeclaringType, typeof(TestClass)); mi = typeof(TestClass).GetMethod("StaticPrivateAbsMethod", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); - Assert.False(mi.IsAbstract); - Assert.False(mi.IsFinal); - Assert.False(mi.IsPublic); - Assert.True(mi.IsStatic); - Assert.False(mi.IsVirtual); + Assert.IsFalse(mi.IsAbstract); + Assert.IsFalse(mi.IsFinal); + Assert.IsFalse(mi.IsPublic); + Assert.IsTrue(mi.IsStatic); + Assert.IsFalse(mi.IsVirtual); Assert.IsType(mi.ReturnType, typeof(void)); TestClass.s_WasStaticMethodCalled = false; mi.Invoke(tst, new object[] { }); - Assert.True(TestClass.s_WasStaticMethodCalled); + Assert.IsTrue(TestClass.s_WasStaticMethodCalled); Assert.IsType(mi.DeclaringType, typeof(AbsTestClass)); mi = typeof(TestClass).GetMethod("PublicMethod", BindingFlags.Instance | BindingFlags.Public); - Assert.False(mi.IsAbstract); - Assert.True(mi.IsFinal); - Assert.True(mi.IsPublic); - Assert.False(mi.IsStatic); - Assert.True(mi.IsVirtual); + Assert.IsFalse(mi.IsAbstract); + Assert.IsTrue(mi.IsFinal); + Assert.IsTrue(mi.IsPublic); + Assert.IsFalse(mi.IsStatic); + Assert.IsTrue(mi.IsVirtual); Assert.IsType(mi.ReturnType, typeof(void)); mi.Invoke(tst, new object[] { }); Assert.IsType(mi.DeclaringType, typeof(TestClass)); mi = typeof(TestClass).GetMethod("InternalMethod", BindingFlags.Instance | BindingFlags.NonPublic); - Assert.False(mi.IsAbstract); - Assert.False(mi.IsFinal); - Assert.False(mi.IsPublic); - Assert.False(mi.IsStatic); - Assert.False(mi.IsVirtual); + Assert.IsFalse(mi.IsAbstract); + Assert.IsFalse(mi.IsFinal); + Assert.IsFalse(mi.IsPublic); + Assert.IsFalse(mi.IsStatic); + Assert.IsFalse(mi.IsVirtual); Assert.IsType(mi.ReturnType, typeof(int)); - Assert.True(1 == (int)mi.Invoke(tst, new object[] { 90.3f })); + Assert.IsTrue(1 == (int)mi.Invoke(tst, new object[] { 90.3f })); Assert.IsType(mi.DeclaringType, typeof(TestClass)); mi = typeof(TestClass).GetMethod("PrivateMethod", BindingFlags.Instance | BindingFlags.NonPublic); - Assert.False(mi.IsAbstract); - Assert.False(mi.IsFinal); - Assert.False(mi.IsPublic); - Assert.False(mi.IsStatic); - Assert.False(mi.IsVirtual); + Assert.IsFalse(mi.IsAbstract); + Assert.IsFalse(mi.IsFinal); + Assert.IsFalse(mi.IsPublic); + Assert.IsFalse(mi.IsStatic); + Assert.IsFalse(mi.IsVirtual); Assert.IsType(mi.ReturnType, typeof(float)); - Assert.True(3.3f == (float)mi.Invoke(tst, new object[] { 92 })); + Assert.IsTrue(3.3f == (float)mi.Invoke(tst, new object[] { 92 })); Assert.IsType(mi.DeclaringType, typeof(TestClass)); } @@ -114,14 +114,14 @@ public void SystemReflectionMemberTests_DelegateMethod_Test1() Delegate del = new MyDelegate(MyDelegateImpl); MethodInfo mi = del.Method; - Assert.False(mi.IsPublic); - Assert.True(mi.IsStatic); - Assert.False(mi.IsVirtual); - Assert.False(mi.IsAbstract); - Assert.False(mi.IsFinal); - Assert.Equal(mi.Name, "MyDelegateImpl"); + Assert.IsFalse(mi.IsPublic); + Assert.IsTrue(mi.IsStatic); + Assert.IsFalse(mi.IsVirtual); + Assert.IsFalse(mi.IsAbstract); + Assert.IsFalse(mi.IsFinal); + Assert.AreEqual(mi.Name, "MyDelegateImpl"); Assert.IsType(mi.ReturnType, typeof(bool)); - Assert.True((bool)mi.Invoke(null, new object[] { 1, 3.3f })); + Assert.IsTrue((bool)mi.Invoke(null, new object[] { 1, 3.3f })); Assert.IsType(mi.DeclaringType, typeof(UnitTestReflectionMemberTest)); } @@ -134,26 +134,26 @@ public void SystemReflectionMemberTests_ConstructorInfo_Test2() Type t = typeof(TestClass); ConstructorInfo ci = t.GetConstructor(new Type[] { }); - Assert.True(ci.IsPublic); - Assert.False(ci.IsStatic); - Assert.True(ci.Invoke(new object[] { }) is TestClass); + Assert.IsTrue(ci.IsPublic); + Assert.IsFalse(ci.IsStatic); + Assert.IsTrue(ci.Invoke(new object[] { }) is TestClass); ci = typeof(AbsTestClass).GetConstructor(new Type[] { typeof(float) }); - Assert.False(ci.IsPublic); - Assert.False(ci.IsStatic); + Assert.IsFalse(ci.IsPublic); + Assert.IsFalse(ci.IsStatic); Assert.IsType(ci.DeclaringType, typeof(AbsTestClass)); AbsTestClass tst = ci.Invoke(new object[] { 1.2f }) as AbsTestClass; - Assert.NotNull(tst); + Assert.IsNotNull(tst); ci = t.GetConstructor(new Type[] { typeof(int) }); - Assert.False(ci.IsStatic); - Assert.False(ci.IsPublic); - Assert.True(ci.Invoke(new object[] { 3 }) is TestClass); + Assert.IsFalse(ci.IsStatic); + Assert.IsFalse(ci.IsPublic); + Assert.IsTrue(ci.Invoke(new object[] { 3 }) is TestClass); ci = t.GetConstructor(new Type[] { typeof(bool) }); - Assert.False(ci.IsStatic); - Assert.False(ci.IsPublic); - Assert.True(ci.Invoke(new object[] { true }) is TestClass); + Assert.IsFalse(ci.IsStatic); + Assert.IsFalse(ci.IsPublic); + Assert.IsTrue(ci.Invoke(new object[] { true }) is TestClass); } [TestMethod] diff --git a/Tests/NFUnitTestSystemLib/UnitTestReflectionTypeTest.cs b/Tests/NFUnitTestSystemLib/UnitTestReflectionTypeTest.cs index 6df314f0..0126ffd3 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestReflectionTypeTest.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestReflectionTypeTest.cs @@ -60,33 +60,33 @@ public void SystemReflectionType_RuntimeType_Test1() Type t = cls.GetType(); Assembly asm = t.Assembly; list.Add(asm); - Assert.Equal(((Assembly)list[i]).GetName().Name, "NFUnitTest"); - Assert.Equal(asm.GetName().Name, "NFUnitTest"); - Assert.Equal(t.Name, "TestClass"); - Assert.Equal(t.FullName, "NFUnitTestSystemLib.UnitTestReflectionTypeTest+TestClass"); + Assert.AreEqual(((Assembly)list[i]).GetName().Name, "NFUnitTest"); + Assert.AreEqual(asm.GetName().Name, "NFUnitTest"); + Assert.AreEqual(t.Name, "TestClass"); + Assert.AreEqual(t.FullName, "NFUnitTestSystemLib.UnitTestReflectionTypeTest+TestClass"); Assert.IsType(t.BaseType, typeof(object)); - Assert.Null(t.GetElementType()); + Assert.IsNull(t.GetElementType()); MethodInfo[] mis = t.GetMethods(); - Assert.Equal(mis[0].Name, "Method1"); + Assert.AreEqual(mis[0].Name, "Method1"); mis = t.GetMethods(BindingFlags.Instance | BindingFlags.NonPublic); - Assert.Equal(mis[0].Name, "Method2"); - Assert.NotNull(t.GetMethod("Method1")); - Assert.NotNull(t.GetMethod("Method2", BindingFlags.Instance | BindingFlags.NonPublic)); + Assert.AreEqual(mis[0].Name, "Method2"); + Assert.IsNotNull(t.GetMethod("Method1")); + Assert.IsNotNull(t.GetMethod("Method2", BindingFlags.Instance | BindingFlags.NonPublic)); FieldInfo[] fis = t.GetFields(); - Assert.Equal(fis[0].Name, "m_Field1"); + Assert.AreEqual(fis[0].Name, "m_Field1"); fis = t.GetFields(BindingFlags.Instance | BindingFlags.NonPublic); - Assert.Equal(fis[0].Name, "m_Field2"); - Assert.NotNull(t.GetField("m_Field1")); - Assert.NotNull(t.GetField("m_Field2", BindingFlags.NonPublic | BindingFlags.Instance)); - Assert.NotNull(t.GetConstructor(new Type[] { })); + Assert.AreEqual(fis[0].Name, "m_Field2"); + Assert.IsNotNull(t.GetField("m_Field1")); + Assert.IsNotNull(t.GetField("m_Field2", BindingFlags.NonPublic | BindingFlags.Instance)); + Assert.IsNotNull(t.GetConstructor(new Type[] { })); Type[] ifaces = t.GetInterfaces(); - Assert.Equal(ifaces.Length, 2); - Assert.Equal(ifaces[0].Name, "IInterface1"); - Assert.Equal(ifaces[1].Name, "IInterface2"); - Assert.True(t.IsSubclassOf(typeof(object))); + Assert.AreEqual(ifaces.Length, 2); + Assert.AreEqual(ifaces[0].Name, "IInterface1"); + Assert.AreEqual(ifaces[1].Name, "IInterface2"); + Assert.IsTrue(t.IsSubclassOf(typeof(object))); i++; // test Type members for a struct valuetype @@ -94,13 +94,13 @@ public void SystemReflectionType_RuntimeType_Test1() t = str.GetType(); asm = t.Assembly; list.Add(asm); - Assert.Equal(((Assembly)list[i]).GetName().Name, "NFUnitTest"); - Assert.Equal(asm.GetName().Name, "NFUnitTest"); - Assert.Equal(t.Name, "TestStruct"); - Assert.Equal(t.FullName, "NFUnitTestSystemLib.UnitTestReflectionTypeTest+TestStruct"); + Assert.AreEqual(((Assembly)list[i]).GetName().Name, "NFUnitTest"); + Assert.AreEqual(asm.GetName().Name, "NFUnitTest"); + Assert.AreEqual(t.Name, "TestStruct"); + Assert.AreEqual(t.FullName, "NFUnitTestSystemLib.UnitTestReflectionTypeTest+TestStruct"); Assert.IsType(t.BaseType, typeof(ValueType)); - Assert.Equal(t.GetInterfaces().Length, 0); - Assert.Null(t.GetElementType()); + Assert.AreEqual(t.GetInterfaces().Length, 0); + Assert.IsNull(t.GetElementType()); i++; // test Type members for an Assembly reflection type @@ -108,38 +108,38 @@ public void SystemReflectionType_RuntimeType_Test1() //t = asmObj.GetType(); //asm = t.Assembly; //list.Add(asm); - //Assert.Equal(((Assembly)list[i]).GetName().Name, "mscorlib"); - //Assert.Equal(asm.GetName().Name, "mscorlib"); - //Assert.Equal(t.Name, "Assembly"); - //Assert.Equal(t.FullName, "System.Reflection.Assembly"); + //Assert.AreEqual(((Assembly)list[i]).GetName().Name, "mscorlib"); + //Assert.AreEqual(asm.GetName().Name, "mscorlib"); + //Assert.AreEqual(t.Name, "Assembly"); + //Assert.AreEqual(t.FullName, "System.Reflection.Assembly"); //Assert.IsType(t.BaseType, typeof(Object)); - //Assert.Equal(t.GetInterfaces().Length, 0); - //Assert.Null(t.GetElementType()); + //Assert.AreEqual(t.GetInterfaces().Length, 0); + //Assert.IsNull(t.GetElementType()); mis = typeof(TestClass).GetMethods(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); t = mis.GetType(); - Assert.Equal(t.Name, "RuntimeMethodInfo[]"); - Assert.Equal(t.FullName, "System.Reflection.RuntimeMethodInfo[]"); + Assert.AreEqual(t.Name, "RuntimeMethodInfo[]"); + Assert.AreEqual(t.FullName, "System.Reflection.RuntimeMethodInfo[]"); Assert.IsType(t.BaseType, typeof(Array)); - Assert.True(t.GetInterfaces().Length > 0); - Assert.Equal(t.GetElementType().Name, "RuntimeMethodInfo"); + Assert.IsTrue(t.GetInterfaces().Length > 0); + Assert.AreEqual(t.GetElementType().Name, "RuntimeMethodInfo"); // test Type members for a delegate Delegate del = new MyDelegate(MyDelegateImpl); t = del.GetType(); - Assert.NotNull(t.DeclaringType); - Assert.Equal(t.Name, "MyDelegate"); + Assert.IsNotNull(t.DeclaringType); + Assert.AreEqual(t.Name, "MyDelegate"); Assert.IsType(t.BaseType, typeof(MulticastDelegate)); // test Type members for an enum TestEnum en = TestEnum.Item1; t = en.GetType(); Assert.IsType(t.DeclaringType, typeof(UnitTestReflectionTypeTest)); - Assert.True( t.IsEnum); - Assert.False(t.IsAbstract); - Assert.False(t.IsClass); - Assert.False(t.IsPublic); - Assert.True(t.IsValueType); + Assert.IsTrue( t.IsEnum); + Assert.IsFalse(t.IsAbstract); + Assert.IsFalse(t.IsClass); + Assert.IsFalse(t.IsPublic); + Assert.IsTrue(t.IsValueType); } [TestMethod] @@ -147,18 +147,18 @@ public void SystemReflectionType_SystemType_Test2() { int[] blah = new int[3]; - Assert.True(typeof(Array).IsInstanceOfType(blah)); - Assert.True(typeof(TestStruct[]).IsArray); - Assert.False(typeof(Array).IsValueType); - Assert.True(typeof(TestStruct).IsValueType); - Assert.True(typeof(Type).IsSubclassOf(typeof(MemberInfo))); - Assert.Equal(typeof(Type).GetInterfaces()[0].Name , "IReflect"); - Assert.True(typeof(MyDelegate).IsInstanceOfType(new MyDelegate(MyDelegateImpl))); + Assert.IsTrue(typeof(Array).IsInstanceOfType(blah)); + Assert.IsTrue(typeof(TestStruct[]).IsArray); + Assert.IsFalse(typeof(Array).IsValueType); + Assert.IsTrue(typeof(TestStruct).IsValueType); + Assert.IsTrue(typeof(Type).IsSubclassOf(typeof(MemberInfo))); + Assert.AreEqual(typeof(Type).GetInterfaces()[0].Name , "IReflect"); + Assert.IsTrue(typeof(MyDelegate).IsInstanceOfType(new MyDelegate(MyDelegateImpl))); // Get known type from assembly qualified type name Culture and PublicKeyToken are used by debugger to identify types // so we must be able to parse them (even if we through out the culture/key). // Type t = Type.GetType("System.Int32, mscorlib, version=4.1.0.0, CultureInfo=enu, PublicKeyToken=null"); - // Assert.NotNull(t); + // Assert.IsNotNull(t); } //------------------- Classes/interfaces/structs used by this test class ---------------------------// diff --git a/Tests/NFUnitTestSystemLib/UnitTestSByte.cs b/Tests/NFUnitTestSystemLib/UnitTestSByte.cs index f93e3f48..5b278fff 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestSByte.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestSByte.cs @@ -15,26 +15,26 @@ public class SByteTests public void Ctor_Empty() { var i = new sbyte(); - Assert.Equal((sbyte)0, i); + Assert.AreEqual((sbyte)0, i); } [TestMethod] public void Ctor_Value() { sbyte i = 41; - Assert.Equal((sbyte)41, i); + Assert.AreEqual((sbyte)41, i); } [TestMethod] public void MaxValue() { - Assert.Equal((sbyte)0x7F, sbyte.MaxValue); + Assert.AreEqual((sbyte)0x7F, sbyte.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal((sbyte)-0x80, sbyte.MinValue); + Assert.AreEqual((sbyte)-0x80, sbyte.MinValue); } [TestMethod] @@ -58,11 +58,11 @@ public void Equals() if (test.Obj is sbyte) { sbyte i2 = (sbyte)test.Obj; - Assert.Equal(test.Expected, test.B.Equals(i2)); - Assert.Equal(test.Expected, test.B.GetHashCode().Equals(i2.GetHashCode())); + Assert.AreEqual(test.Expected, test.B.Equals(i2)); + Assert.AreEqual(test.Expected, test.B.GetHashCode().Equals(i2.GetHashCode())); } - Assert.Equal(test.Expected, test.B.Equals(test.Obj)); + Assert.AreEqual(test.Expected, test.B.Equals(test.Obj)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestSingle.cs b/Tests/NFUnitTestSystemLib/UnitTestSingle.cs index 345d17a7..c7e950c8 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestSingle.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestSingle.cs @@ -15,35 +15,35 @@ public class SingleTests public void Ctor_Empty() { var f = new float(); - Assert.Equal(0, f); + Assert.AreEqual(0, f); } [TestMethod] public void Ctor_Value() { float f = 41; - Assert.Equal(41, f); + Assert.AreEqual(41, f); f = 41.3f; - Assert.Equal(41.3f, f); + Assert.AreEqual(41.3f, f); } [TestMethod] public void MaxValue() { - Assert.Equal((float)3.40282346638528859e+38, float.MaxValue); + Assert.AreEqual((float)3.40282346638528859e+38, float.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal((float)-3.40282346638528859e+38, float.MinValue); + Assert.AreEqual((float)-3.40282346638528859e+38, float.MinValue); } [TestMethod] public void Epsilon() { - Assert.Equal((float)1.4e-45, float.Epsilon); + Assert.AreEqual((float)1.4e-45, float.Epsilon); } [TestMethod] @@ -64,23 +64,23 @@ public void Equals() { if (test.Value is float f2) { - Assert.Equal(test.Expected, test.F1.Equals(f2)); + Assert.AreEqual(test.Expected, test.F1.Equals(f2)); if (float.IsNaN((float)test.F1) && float.IsNaN(f2)) { - Assert.Equal(!test.Expected, (float)test.F1 == f2); - Assert.Equal(test.Expected, (float)test.F1 != f2); + Assert.AreEqual(!test.Expected, (float)test.F1 == f2); + Assert.AreEqual(test.Expected, (float)test.F1 != f2); } else { - Assert.Equal(test.Expected, (float)test.F1 == f2); - Assert.Equal(!test.Expected, (float)test.F1 != f2); + Assert.AreEqual(test.Expected, (float)test.F1 == f2); + Assert.AreEqual(!test.Expected, (float)test.F1 != f2); } - Assert.Equal(test.Expected, test.F1.GetHashCode().Equals(f2.GetHashCode())); + Assert.AreEqual(test.Expected, test.F1.GetHashCode().Equals(f2.GetHashCode())); } - Assert.Equal(test.Expected, test.F1.Equals(test.Value)); + Assert.AreEqual(test.Expected, test.F1.Equals(test.Value)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestStringTests.cs b/Tests/NFUnitTestSystemLib/UnitTestStringTests.cs index 6538870f..1bfb4b9f 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestStringTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestStringTests.cs @@ -22,36 +22,36 @@ public void Ctor_Test() OutputHelper.WriteLine("Char [], start, number"); string str = new string(car, 1, 2); - Assert.Equal(str, "bc"); + Assert.AreEqual(str, "bc"); str = new string(car, 0, 4); - Assert.Equal(str, "abcd"); + Assert.AreEqual(str, "abcd"); OutputHelper.WriteLine("Char []"); str = new string(car); - Assert.Equal(str, "abcd"); + Assert.AreEqual(str, "abcd"); OutputHelper.WriteLine("Char, number"); str = new string('\n', 33); - Assert.Equal(str.Length, 33); + Assert.AreEqual(str.Length, 33); for (int i = 0; i < str.Length; i++) { - Assert.Equal(str[i], '\n'); + Assert.AreEqual(str[i], '\n'); } OutputHelper.WriteLine("Char, string terminator known failure. "); char[] car2 = new char[] { (char)0, (char)65 }; string s = new string(car2); - Assert.Equal(s, "\0A"); + Assert.AreEqual(s, "\0A"); OutputHelper.WriteLine("This was previously bug 20620"); OutputHelper.WriteLine("new char[0]"); str = new string(new char[0]); - Assert.Equal(str, string.Empty); + Assert.AreEqual(str, string.Empty); OutputHelper.WriteLine("null"); str = new string(null); - Assert.Equal(str, string.Empty); + Assert.AreEqual(str, string.Empty); } [TestMethod] @@ -61,11 +61,11 @@ public void CompareTo_Test3() string str = "hello"; object ob = "Hello"; OutputHelper.WriteLine("NormalCompareTo"); - Assert.Equal(str.CompareTo((object)"hello"), 0); - Assert.True(str.CompareTo(ob) > 0); - Assert.True(str.CompareTo((object)"zello") < 0); + Assert.AreEqual(str.CompareTo((object)"hello"), 0); + Assert.IsTrue(str.CompareTo(ob) > 0); + Assert.IsTrue(str.CompareTo((object)"zello") < 0); OutputHelper.WriteLine("CompareTo null"); - Assert.True(str.CompareTo((object)null) > 0); + Assert.IsTrue(str.CompareTo((object)null) > 0); } [TestMethod] @@ -82,11 +82,11 @@ public void GetHashCode_Test4() strs[j].GetHashCode().ToString()); if (i == j) { - Assert.Equal(strs[i].GetHashCode(), strs[j].GetHashCode()); + Assert.AreEqual(strs[i].GetHashCode(), strs[j].GetHashCode()); } else { - Assert.NotEqual(strs[i].GetHashCode(), strs[j].GetHashCode()); + Assert.AreNotEqual(strs[i].GetHashCode(), strs[j].GetHashCode()); } } } @@ -103,19 +103,19 @@ public void Equals_Test5() object ob2 = "bcd"; object ob = str as object; - Assert.True(str.Equals(ob)); - Assert.False(str.Equals((object)123)); - Assert.True(str.Equals((object)"abcd")); - Assert.False(str.Equals((object)"bcd")); - Assert.False(str.Equals(ob2)); + Assert.IsTrue(str.Equals(ob)); + Assert.IsFalse(str.Equals((object)123)); + Assert.IsTrue(str.Equals((object)"abcd")); + Assert.IsFalse(str.Equals((object)"bcd")); + Assert.IsFalse(str.Equals(ob2)); string str1 = "abc\n"; string str2 = "abcd"; string str3 = "abc\n"; - Assert.True(str1.Equals(str3)); - Assert.False(str1.Equals(str2)); - Assert.True(str3.Equals(str1)); - Assert.True(str3.Equals("abc" + "\n")); - Assert.True(str2.Equals("a" + "b" + 'c' + "d")); + Assert.IsTrue(str1.Equals(str3)); + Assert.IsFalse(str1.Equals(str2)); + Assert.IsTrue(str3.Equals(str1)); + Assert.IsTrue(str3.Equals("abc" + "\n")); + Assert.IsTrue(str2.Equals("a" + "b" + 'c' + "d")); } [TestMethod] @@ -123,9 +123,9 @@ public void ToString_Test6() { OutputHelper.WriteLine("Test of the ToString method"); string str = "abc"; - Assert.Equal(str, str.ToString()); - Assert.Equal(str, str.ToString().ToString().ToString()); - Assert.Equal(str.ToString(), "abc"); + Assert.AreEqual(str, str.ToString()); + Assert.AreEqual(str, str.ToString().ToString().ToString()); + Assert.AreEqual(str.ToString(), "abc"); } [TestMethod] @@ -162,17 +162,17 @@ public void Split_Test15() string str1 = "ab@cd"; string str2 = "abcd@"; - Assert.Equal(str1.Split(car1)[0], "ab"); - Assert.Equal(str1.Split(car1)[1], "cd"); - Assert.Equal(str2.Split(car1)[0], "abcd"); - Assert.Equal(str2.Split(car1)[1], ""); - Assert.Equal(str1.Split(car2)[0], "ab@cd"); + Assert.AreEqual(str1.Split(car1)[0], "ab"); + Assert.AreEqual(str1.Split(car1)[1], "cd"); + Assert.AreEqual(str2.Split(car1)[0], "abcd"); + Assert.AreEqual(str2.Split(car1)[1], ""); + Assert.AreEqual(str1.Split(car2)[0], "ab@cd"); OutputHelper.WriteLine("Verify split with a count"); OutputHelper.WriteLine("This is currently a known issue"); OutputHelper.WriteLine("20659 String.Split with a count parameter always returns the whole string."); string[] oneTwoThree = "1 2 3".Split(new char[] { ' ' }, 1); - Assert.True(oneTwoThree.Length <= 1); + Assert.IsTrue(oneTwoThree.Length <= 1); } [TestMethod] @@ -181,10 +181,10 @@ public void Substring_Test17() OutputHelper.WriteLine("Testing the Substring method"); string str1 = "abcde"; - Assert.Equal(str1.Substring(0), str1); - Assert.Equal(str1.Substring(0, 5), str1); - Assert.Equal(str1.Substring(2), "cde"); - Assert.Equal(str1.Substring(2, 1), "c"); + Assert.AreEqual(str1.Substring(0), str1); + Assert.AreEqual(str1.Substring(0, 5), str1); + Assert.AreEqual(str1.Substring(2), "cde"); + Assert.AreEqual(str1.Substring(2, 1), "c"); } [TestMethod] @@ -195,10 +195,10 @@ public void Trim_Test19() char[] car1 = new Char[] { '@', 'q' }; string str1 = " abc@de "; string str2 = "@abc @ de@"; - Assert.Equal(str1.Trim(), "abc@de"); - Assert.Equal(str1.Trim(car1), " abc@de "); - Assert.Equal(str2.Trim(), "@abc @ de@"); - Assert.Equal(str2.Trim(car1), "abc @ de"); + Assert.AreEqual(str1.Trim(), "abc@de"); + Assert.AreEqual(str1.Trim(car1), " abc@de "); + Assert.AreEqual(str2.Trim(), "@abc @ de@"); + Assert.AreEqual(str2.Trim(car1), "abc @ de"); } [TestMethod] @@ -209,10 +209,10 @@ public void TrimStart_Test20() char[] car1 = new Char[] { '@', 'q' }; string str1 = " abc@de "; string str2 = "@abc @ de@"; - Assert.Equal(str1.TrimStart(), "abc@de "); - Assert.Equal(str1.TrimStart(car1), " abc@de "); - Assert.Equal(str2.TrimStart(), "@abc @ de@"); - Assert.Equal(str2.TrimStart(car1), "abc @ de@"); + Assert.AreEqual(str1.TrimStart(), "abc@de "); + Assert.AreEqual(str1.TrimStart(car1), " abc@de "); + Assert.AreEqual(str2.TrimStart(), "@abc @ de@"); + Assert.AreEqual(str2.TrimStart(car1), "abc @ de@"); } [TestMethod] @@ -223,10 +223,10 @@ public void TrimEnd_Test21() char[] car1 = new Char[] { '@', 'q' }; string str1 = " abc@de "; string str2 = "@abc @ de@"; - Assert.Equal(str1.TrimEnd(), " abc@de"); - Assert.Equal(str1.TrimEnd(car1), " abc@de "); - Assert.Equal(str2.TrimEnd(), "@abc @ de@"); - Assert.Equal(str2.TrimEnd(car1), "@abc @ de"); + Assert.AreEqual(str1.TrimEnd(), " abc@de"); + Assert.AreEqual(str1.TrimEnd(car1), " abc@de "); + Assert.AreEqual(str2.TrimEnd(), "@abc @ de@"); + Assert.AreEqual(str2.TrimEnd(car1), "@abc @ de"); } [TestMethod] @@ -235,12 +235,12 @@ public void IndexOf_Test28() OutputHelper.WriteLine("Testing the IndexOf method"); string str1 = "@ abc@de "; - Assert.Equal(str1.IndexOf('@'), 0); - Assert.Equal(str1.IndexOf("abc"), 2); - Assert.Equal(str1.IndexOf('@', 1), 5); - Assert.Equal(str1.IndexOf('@', 1, 1), -1); - Assert.Equal(str1.IndexOf("abc", 2), 2); - Assert.Equal(str1.IndexOf("abc", 1, 1), -1); + Assert.AreEqual(str1.IndexOf('@'), 0); + Assert.AreEqual(str1.IndexOf("abc"), 2); + Assert.AreEqual(str1.IndexOf('@', 1), 5); + Assert.AreEqual(str1.IndexOf('@', 1, 1), -1); + Assert.AreEqual(str1.IndexOf("abc", 2), 2); + Assert.AreEqual(str1.IndexOf("abc", 1, 1), -1); } [TestMethod] @@ -251,8 +251,8 @@ public void IndexOfAny_Test31() string str1 = "@ abc@de "; char[] car1 = new Char[] { '@', 'b' }; - Assert.Equal(str1.IndexOfAny(car1), 0); - Assert.Equal(str1.IndexOfAny(car1, 1), 3); + Assert.AreEqual(str1.IndexOfAny(car1), 0); + Assert.AreEqual(str1.IndexOfAny(car1, 1), 3); } [TestMethod] @@ -261,12 +261,12 @@ public void LastIndexOf_Test37() OutputHelper.WriteLine("Testing the LastIndexOf method"); string str1 = "@ abc@de "; - Assert.Equal(str1.LastIndexOf('@'), 5); - Assert.Equal(str1.LastIndexOf("abc"), 2); - Assert.Equal(str1.LastIndexOf('@', 1), 0); - Assert.Equal(str1.LastIndexOf('@', 1, 1), -1); - Assert.Equal(str1.LastIndexOf("abc", 2), -1); - Assert.Equal(str1.LastIndexOf("@", 6, 1), -1); + Assert.AreEqual(str1.LastIndexOf('@'), 5); + Assert.AreEqual(str1.LastIndexOf("abc"), 2); + Assert.AreEqual(str1.LastIndexOf('@', 1), 0); + Assert.AreEqual(str1.LastIndexOf('@', 1, 1), -1); + Assert.AreEqual(str1.LastIndexOf("abc", 2), -1); + Assert.AreEqual(str1.LastIndexOf("@", 6, 1), -1); } [TestMethod] @@ -277,9 +277,9 @@ public void LastIndexOfAny_Test40() string str1 = "@ abc@de "; char[] car1 = new Char[] { '@', 'b' }; - Assert.Equal(str1.LastIndexOfAny(car1), 5); - Assert.Equal(str1.LastIndexOfAny(car1, 1), 0); - Assert.Equal(str1.LastIndexOfAny(car1, 4, 1), -1); + Assert.AreEqual(str1.LastIndexOfAny(car1), 5); + Assert.AreEqual(str1.LastIndexOfAny(car1, 1), 0); + Assert.AreEqual(str1.LastIndexOfAny(car1, 4, 1), -1); } [TestMethod] @@ -288,7 +288,7 @@ public void ToLower_Test51() OutputHelper.WriteLine("Testing the ToLower method"); string str1 = "@ ABC@de "; - Assert.Equal(str1.ToLower(), "@ abc@de "); + Assert.AreEqual(str1.ToLower(), "@ abc@de "); } [TestMethod] @@ -297,7 +297,7 @@ public void ToUpper_Test52() OutputHelper.WriteLine("Testing the ToUpper method"); ; string str1 = "@ ABC@de "; - Assert.Equal(str1.ToUpper(), "@ ABC@DE "); + Assert.AreEqual(str1.ToUpper(), "@ ABC@DE "); } [TestMethod] @@ -306,22 +306,22 @@ public void Length_Test71() OutputHelper.WriteLine("Testing the Length property"); ; string str1 = "@ ABC@de "; - Assert.Equal(str1.Length, 9); + Assert.AreEqual(str1.Length, 9); } [TestMethod] public void Concat_Test1() { string str = "a" + 1 + "b" + new ToStringReturnsNull(); - Assert.Equal(str, "a1b"); + Assert.AreEqual(str, "a1b"); } [TestMethod] public void Format() { - Assert.Equal(String.Format("The value is {0}", 32), "The value is 32", + Assert.AreEqual(String.Format("The value is {0}", 32), "The value is 32", "String.Format with a single variable"); - Assert.Equal(String.Format("The value with formatter is {0:d3}", 32), "The value with formatter is 032", + Assert.AreEqual(String.Format("The value with formatter is {0:d3}", 32), "The value with formatter is 032", "String.Format with a decimal formatter."); } @@ -329,13 +329,13 @@ public void Format() public void FormatWithNull() { object nullObject = null; - Assert.Equal(String.Format("The value is {0}", nullObject), "The value is ", + Assert.AreEqual(String.Format("The value is {0}", nullObject), "The value is ", "String.Format should treat a null argument as an empty string"); - Assert.Equal(String.Format("The value with formatter is {0:d}", nullObject), "The value with formatter is ", + Assert.AreEqual(String.Format("The value with formatter is {0:d}", nullObject), "The value with formatter is ", "String.Format should treat a null argument as an empty string when used with formatters."); - Assert.Equal(String.Format("First parm: '{0}' second parm: '{1}'", new object[] { nullObject, 32 }), "First parm: '' second parm: '32'", + Assert.AreEqual(String.Format("First parm: '{0}' second parm: '{1}'", new object[] { nullObject, 32 }), "First parm: '' second parm: '32'", "Formatting with two parms should also work"); - Assert.Equal($"the value is {nullObject}", "the value is ", "Interpolated strings should use string.format and work correctly"); + Assert.AreEqual($"the value is {nullObject}", "the value is ", "Interpolated strings should use string.format and work correctly"); } [TestMethod] @@ -345,28 +345,28 @@ public void Contains_String() string s = "Hello"; string value = "ello"; - Assert.True(s.Contains(value)); + Assert.IsTrue(s.Contains(value)); value = ""; - Assert.True(s.Contains(value)); + Assert.IsTrue(s.Contains(value)); value = "hello"; - Assert.False(s.Contains(value)); + Assert.IsFalse(s.Contains(value)); value = "ELL"; - Assert.False(s.Contains(value)); + Assert.IsFalse(s.Contains(value)); value = "Larger Hello"; - Assert.False(s.Contains(value)); + Assert.IsFalse(s.Contains(value)); value = "Goodbye"; - Assert.False(s.Contains(value)); + Assert.IsFalse(s.Contains(value)); value = ""; - Assert.True(value.Contains(value)); + Assert.IsTrue(value.Contains(value)); string s1 = "456"; - Assert.True(s1.Contains(s1)); + Assert.IsTrue(s1.Contains(s1)); } [TestMethod] @@ -378,19 +378,19 @@ public void ZeroLengthContains_StringComparison() string s1 = new string(a); string s2 = new string(a, 2, 0); - Assert.True(s1.Contains(s2)); + Assert.IsTrue(s1.Contains(s2)); s1 = string.Empty; - Assert.True(s1.Contains(s2)); + Assert.IsTrue(s1.Contains(s2)); var span = new string(a); var emptySlice = new string(a, 2, 0); - Assert.True(span.Contains(emptySlice)); + Assert.IsTrue(span.Contains(emptySlice)); - Assert.True(span.Contains(emptySlice)); + Assert.IsTrue(span.Contains(emptySlice)); span = string.Empty; - Assert.True(span.Contains(emptySlice)); + Assert.IsTrue(span.Contains(emptySlice)); } [TestMethod] @@ -402,7 +402,7 @@ public void ContainsMatch_StringComparison() string s1 = value.Substring(0, 3); string s2 = value.Substring(0, 2); - Assert.True(s1.Contains(s2)); + Assert.IsTrue(s1.Contains(s2)); } [TestMethod] @@ -415,7 +415,7 @@ public void ContainsMatchDifferentSpans_StringComparison() string s1 = value1.Substring(0, 3); string s2 = value2.Substring(0, 3); - Assert.True(s1.Contains(s2)); + Assert.IsTrue(s1.Contains(s2)); } [TestMethod] @@ -438,9 +438,9 @@ public void ContainsNoMatch_StringComparison() string s1 = new(first); string s2 = new(second); - Assert.False(s1.Contains(s2)); + Assert.IsFalse(s1.Contains(s2)); - Assert.Equal( + Assert.AreEqual( s1.StartsWith(s2), s1.Contains(s2)); } @@ -467,12 +467,12 @@ public void MakeSureNoContainsChecksGoOutOfRange_StringComparison() // Contains either works or throws ArgumentOutOfRangeException try { - Assert.True(s1.Contains(s2)); + Assert.IsTrue(s1.Contains(s2)); } catch(ArgumentOutOfRangeException) { // this is the intended outcome at some point - Assert.True(true); + Assert.IsTrue(true); } } } @@ -485,54 +485,54 @@ public static void StartsWith_StringComparison() string s = "Hello"; string value = "H"; - Assert.True(s.StartsWith(value)); + Assert.IsTrue(s.StartsWith(value)); value = "Hel"; - Assert.True(s.StartsWith(value)); + Assert.IsTrue(s.StartsWith(value)); value = "Hello"; - Assert.True(s.StartsWith(value)); + Assert.IsTrue(s.StartsWith(value)); value = ""; - Assert.True(s.StartsWith(value)); + Assert.IsTrue(s.StartsWith(value)); value = "Hello Larger"; - Assert.False(s.StartsWith(value)); + Assert.IsFalse(s.StartsWith(value)); value = "HEL"; - Assert.False(s.StartsWith(value)); + Assert.IsFalse(s.StartsWith(value)); value = "Abc"; - Assert.False(s.StartsWith(value)); + Assert.IsFalse(s.StartsWith(value)); s = ""; value = "Hello"; - Assert.False(s.StartsWith(value)); + Assert.IsFalse(s.StartsWith(value)); s = "abcdefghijklmnopqrstuvwxyz"; value = "abcdefghijklmnopqrstuvwxyz"; - Assert.True(s.StartsWith(value)); + Assert.IsTrue(s.StartsWith(value)); value = "abcdefghijklmnopqrstuvwx"; - Assert.True(s.StartsWith(value)); + Assert.IsTrue(s.StartsWith(value)); value = "abcdefghijklm"; - Assert.True(s.StartsWith(value)); + Assert.IsTrue(s.StartsWith(value)); value = "ab_defghijklmnopqrstu"; - Assert.False(s.StartsWith(value)); + Assert.IsFalse(s.StartsWith(value)); value = "abcdef_hijklmn"; - Assert.False(s.StartsWith(value)); + Assert.IsFalse(s.StartsWith(value)); value = "abcdefghij_lmn"; - Assert.False(s.StartsWith(value)); + Assert.IsFalse(s.StartsWith(value)); value = "a"; - Assert.True(s.StartsWith(value)); + Assert.IsTrue(s.StartsWith(value)); value = "abcdefghijklmnopqrstuvwxyza"; - Assert.False(s.StartsWith(value)); + Assert.IsFalse(s.StartsWith(value)); } [TestMethod] @@ -540,11 +540,11 @@ public static void StartsWith_NullInStrings() { OutputHelper.WriteLine("Test of StartsWith with null strings"); - Assert.False("\0test".StartsWith("test")); - Assert.False("te\0st".StartsWith("test")); - Assert.True("te\0st".StartsWith("te\0s")); - Assert.True("test\0".StartsWith("test")); - Assert.True("test".StartsWith("te\0")); + Assert.IsFalse("\0test".StartsWith("test")); + Assert.IsFalse("te\0st".StartsWith("test")); + Assert.IsTrue("te\0st".StartsWith("te\0s")); + Assert.IsTrue("test\0".StartsWith("test")); + Assert.IsTrue("test".StartsWith("te\0")); } [TestMethod] @@ -555,7 +555,7 @@ public static void StartsWith_Invalid() string s = "Hello"; // Value is null - Assert.Throws(typeof(ArgumentNullException), () => { s.StartsWith(null); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { s.StartsWith(null); }); } [TestMethod] @@ -568,7 +568,7 @@ public static void ZeroLengthStartsWith_Char() string s1 = new(a); string s2 = new(a, 2, 0); bool b = s1.StartsWith(s2); - Assert.True(b); + Assert.IsTrue(b); } [TestMethod] @@ -579,7 +579,7 @@ public static void EndsWith_Invalid() string s = "Hello"; // Value is null - Assert.Throws(typeof(ArgumentNullException), () => { s.EndsWith(null); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { s.EndsWith(null); }); } [TestMethod] @@ -589,7 +589,7 @@ public static void SameSpanStartsWith_Char() string s1 = "456"; - Assert.True(s1.StartsWith(s1)); + Assert.IsTrue(s1.StartsWith(s1)); } [TestMethod] @@ -602,7 +602,7 @@ public static void LengthMismatchStartsWith_Char() string s1 = new string(a, 0, 2); string s2 = new string(a, 0, 3); bool b = s1.StartsWith(s2); - Assert.False(b); + Assert.IsFalse(b); } [TestMethod] @@ -615,7 +615,7 @@ public static void StartsWithMatch_Char() string s1 = new(a, 0, 3); string s2 = new(a, 0, 2); bool b = s1.StartsWith(s2); - Assert.True(b); + Assert.IsTrue(b); } [TestMethod] @@ -639,7 +639,7 @@ public static void StartsWithNoMatch_Char() string s1 = new(first); string s2 = new(second); bool b = s1.StartsWith(s2); - Assert.False(b); + Assert.IsFalse(b); } } } @@ -661,7 +661,7 @@ public static void MakeSureNoStartsWithChecksGoOutOfRange_Char() string s1 = new(first, 1, length); string s2 = new(second, 1, length); bool b = s1.StartsWith(s2); - Assert.True(b); + Assert.IsTrue(b); } } @@ -674,10 +674,10 @@ public static void ZeroLengthStartsWith_StringComparison() string s1 = new string(a); string s2 = new string(a, 2, 0); - Assert.True(s1.StartsWith(s2)); + Assert.IsTrue(s1.StartsWith(s2)); s1 = string.Empty; - Assert.True(s1.StartsWith(s2)); + Assert.IsTrue(s1.StartsWith(s2)); } [TestMethod] @@ -686,7 +686,7 @@ public static void SameSpanStartsWith_StringComparison() OutputHelper.WriteLine("Test of StartsWith with self"); string s1 = "456"; - Assert.True(s1.StartsWith(s1)); + Assert.IsTrue(s1.StartsWith(s1)); } [TestMethod] @@ -698,7 +698,7 @@ public static void LengthMismatchStartsWith_StringComparison() string s1 = value.Substring(0, 2); string s2 = value.Substring(0, 3); - Assert.False(s1.StartsWith(s2)); + Assert.IsFalse(s1.StartsWith(s2)); } [TestMethod] @@ -710,7 +710,7 @@ public static void StartsWithMatch_StringComparison() string s1 = value.Substring(0, 3); string s2 = value.Substring(0, 2); - Assert.True(s1.StartsWith(s2)); + Assert.IsTrue(s1.StartsWith(s2)); } [TestMethod] @@ -721,35 +721,35 @@ public static void EndsWith_StringComparison() string s = "Hello"; string value = "o"; - Assert.True(s.EndsWith(value)); + Assert.IsTrue(s.EndsWith(value)); value = "llo"; - Assert.True(s.EndsWith(value)); + Assert.IsTrue(s.EndsWith(value)); value = "Hello"; - Assert.True(s.EndsWith(value)); + Assert.IsTrue(s.EndsWith(value)); value = ""; - Assert.True(s.EndsWith(value)); + Assert.IsTrue(s.EndsWith(value)); value = "Larger Hello"; - Assert.False(s.EndsWith(value)); + Assert.IsFalse(s.EndsWith(value)); value = "LLO"; - Assert.False(s.EndsWith(value)); + Assert.IsFalse(s.EndsWith(value)); value = "Abc"; - Assert.False(s.EndsWith(value)); + Assert.IsFalse(s.EndsWith(value)); value = "a"; - Assert.False(s.EndsWith(value)); + Assert.IsFalse(s.EndsWith(value)); s = ""; value = ""; - Assert.True(s.EndsWith(value)); + Assert.IsTrue(s.EndsWith(value)); value = "a"; - Assert.False(s.EndsWith(value)); + Assert.IsFalse(s.EndsWith(value)); } [TestMethod] @@ -757,10 +757,10 @@ public static void EndsWith_NullInStrings() { OutputHelper.WriteLine("Test of EndsWith with null strings"); - Assert.True("te\0st".EndsWith("e\0st")); - Assert.False("te\0st".EndsWith("test")); - Assert.True("test\0".EndsWith("test")); - Assert.True("test".EndsWith("\0st")); + Assert.IsTrue("te\0st".EndsWith("e\0st")); + Assert.IsFalse("te\0st".EndsWith("test")); + Assert.IsTrue("test\0".EndsWith("test")); + Assert.IsTrue("test".EndsWith("\0st")); } [TestMethod] @@ -773,7 +773,7 @@ public static void ZeroLengthEndsWith_Char() string s1 = new string(a); string s2 = new string(a, 2, 0); bool b = s1.EndsWith(s2); - Assert.True(b); + Assert.IsTrue(b); } [TestMethod] @@ -783,7 +783,7 @@ public static void SameSpanEndsWith_Char() string s = "456"; bool b = s.EndsWith(s); - Assert.True(b); + Assert.IsTrue(b); } [TestMethod] @@ -796,7 +796,7 @@ public static void LengthMismatchEndsWith_Char() string s1 = value.Substring(0, 2); string s2 = value.Substring(0, 3); bool b = s1.EndsWith(s2); - Assert.False(b); + Assert.IsFalse(b); } [TestMethod] @@ -809,7 +809,7 @@ public static void EndsWithMatch_Char() string s1 = value.Substring(0, 3); string s2 = value.Substring(1, 2); bool b = s1.EndsWith(s2); - Assert.True(b); + Assert.IsTrue(b); } [TestMethod] @@ -834,7 +834,7 @@ public static void EndsWithNoMatch_Char() string s2 = new(second); bool b = s1.EndsWith(s2); - Assert.False(b); + Assert.IsFalse(b); } } } @@ -848,10 +848,10 @@ public static void ZeroLengthEndsWith_StringComparison() string s1 = new(a); string s2 = new(a, 2, 0); - Assert.True(s1.EndsWith(s2)); + Assert.IsTrue(s1.EndsWith(s2)); s1 = string.Empty; - Assert.True(s1.EndsWith(s2)); + Assert.IsTrue(s1.EndsWith(s2)); } [TestMethod] @@ -871,7 +871,7 @@ public static void MakeSureNoEndsWithChecksGoOutOfRange_Char() string s1 = new(first, 1, length); string s2 = new(second, 1, length); bool b = s1.EndsWith(s2); - Assert.True(b); + Assert.IsTrue(b); } } @@ -884,7 +884,7 @@ public static void LengthMismatchEndsWith_StringComparison() string s1 = value.Substring(0, 2); string s2 = value.Substring(0, 3); - Assert.False(s1.EndsWith(s2)); + Assert.IsFalse(s1.EndsWith(s2)); } [TestMethod] @@ -896,7 +896,7 @@ public static void EndsWithMatch_StringComparison() string s1 = value.Substring(0, 3); string s2 = value.Substring(1, 2); - Assert.True(s1.EndsWith(s2)); + Assert.IsTrue(s1.EndsWith(s2)); } [TestMethod] @@ -909,7 +909,7 @@ public static void EndsWithMatchDifferentSpans_StringComparison() string s1 = value1.Substring(1, 3); string s2 = value2.Substring(0, 3); - Assert.True(s1.EndsWith(s2)); + Assert.IsTrue(s1.EndsWith(s2)); } [TestMethod] @@ -932,7 +932,7 @@ public static void EndsWithNoMatch_StringComparison() string s1 = new(first); string s2 = new(second); - Assert.False(s1.EndsWith(s2)); + Assert.IsFalse(s1.EndsWith(s2)); } } } @@ -953,7 +953,7 @@ public static void MakeSureNoEndsWithChecksGoOutOfRange_StringComparison() string s1 = new string(first, 1, length); string s2 = new string(second, 1, length); - Assert.True(s1.EndsWith(s2)); + Assert.IsTrue(s1.EndsWith(s2)); } } @@ -964,7 +964,7 @@ public static void EndsWithNoMatchNonOrdinal_StringComparison() string s = "dabc"; string value = "aDc"; - Assert.False(s.EndsWith(value)); + Assert.IsFalse(s.EndsWith(value)); } /// diff --git a/Tests/NFUnitTestSystemLib/UnitTestTimeSpan.cs b/Tests/NFUnitTestSystemLib/UnitTestTimeSpan.cs index 4104a9a6..a15ea104 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestTimeSpan.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestTimeSpan.cs @@ -54,13 +54,13 @@ public void CCtor_Test() OutputHelper.WriteLine("Copy Constructor test"); TimeSpan ts = new TimeSpan(); OutputHelper.WriteLine(ts.ToString()); - Assert.True(CCtorHelper(ref ts)); + Assert.IsTrue(CCtorHelper(ref ts)); ts = TimeSpan.MaxValue; ts = new TimeSpan(); OutputHelper.WriteLine(ts.ToString()); - Assert.True(CCtorHelper(ref ts)); + Assert.IsTrue(CCtorHelper(ref ts)); ts = TimeSpan.MinValue; - Assert.True(CCtorHelper(ref ts)); + Assert.IsTrue(CCtorHelper(ref ts)); int mxd = 24000; int mx = 1000; @@ -78,7 +78,7 @@ public void CCtor_Test() int ims = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); ts = new TimeSpan(id, ih, im, ise, ims); - Assert.True(CCtorHelper(ref ts)); + Assert.IsTrue(CCtorHelper(ref ts)); } } @@ -100,11 +100,11 @@ public void Ctor64Helper(Int64 i64) long milliseconds = (i64 - ts.Days * m_TicksPerDay - ts.Hours * m_TicksPerHour - ts.Minutes * m_TicksPerMinute - ts.Seconds * m_TicksPerSecond) / m_TicksPerMillisecond; - Assert.Equal(ts.Days, days); - Assert.Equal(ts.Hours, hours); - Assert.Equal(ts.Minutes, minutes); - Assert.Equal(ts.Seconds, seconds); - Assert.Equal(ts.Milliseconds, milliseconds); + Assert.AreEqual(ts.Days, days); + Assert.AreEqual(ts.Hours, hours); + Assert.AreEqual(ts.Minutes, minutes); + Assert.AreEqual(ts.Seconds, seconds); + Assert.AreEqual(ts.Milliseconds, milliseconds); OutputHelper.WriteLine(ts.ToString()); } @@ -179,13 +179,13 @@ public void CtorHelper(int[] vals) throw new Exception("Invalid parameter!"); break; } - Assert.Equal(ts.Days, i64 / m_TicksPerDay); - Assert.Equal(ts.Hours, (i64 - ts.Days * m_TicksPerDay) / m_TicksPerHour); - Assert.Equal(ts.Minutes, (i64 - ts.Days * m_TicksPerDay - ts.Hours * + Assert.AreEqual(ts.Days, i64 / m_TicksPerDay); + Assert.AreEqual(ts.Hours, (i64 - ts.Days * m_TicksPerDay) / m_TicksPerHour); + Assert.AreEqual(ts.Minutes, (i64 - ts.Days * m_TicksPerDay - ts.Hours * m_TicksPerHour) / m_TicksPerMinute); - Assert.Equal(ts.Seconds, (i64 - ts.Days * m_TicksPerDay - ts.Hours * + Assert.AreEqual(ts.Seconds, (i64 - ts.Days * m_TicksPerDay - ts.Hours * m_TicksPerHour - ts.Minutes * m_TicksPerMinute) / m_TicksPerSecond); - Assert.Equal(ts.Milliseconds, (i64 - ts.Days * m_TicksPerDay - ts.Hours * + Assert.AreEqual(ts.Milliseconds, (i64 - ts.Days * m_TicksPerDay - ts.Hours * m_TicksPerHour - ts.Minutes * m_TicksPerMinute - ts.Seconds * m_TicksPerSecond) / m_TicksPerMillisecond); OutputHelper.WriteLine(ts.Days.ToString() + " : " + @@ -292,11 +292,11 @@ public void CompareTo_Test4() TimeSpan ts1 = new TimeSpan(day, hour, minute, second, msec); OutputHelper.WriteLine("Testing CompareTo"); - Assert.Equal(-1, ts1.CompareTo(new TimeSpan(day + 1, hour, minute, second, msec))); + Assert.AreEqual(-1, ts1.CompareTo(new TimeSpan(day + 1, hour, minute, second, msec))); OutputHelper.WriteLine(ts1.CompareTo(new TimeSpan(day + 1, hour, minute, second, msec)).ToString()); - Assert.Equal(1, ts1.CompareTo(new TimeSpan(day, hour - 1, minute, second, msec))); + Assert.AreEqual(1, ts1.CompareTo(new TimeSpan(day, hour - 1, minute, second, msec))); OutputHelper.WriteLine(ts1.CompareTo(new TimeSpan(day, hour - 1, minute, second, msec)).ToString()); - Assert.Equal(0, ts1.CompareTo(new TimeSpan(day, hour, minute, second, msec))); + Assert.AreEqual(0, ts1.CompareTo(new TimeSpan(day, hour, minute, second, msec))); OutputHelper.WriteLine(ts1.CompareTo(new TimeSpan(day, hour, minute, second, msec)).ToString()); } @@ -321,7 +321,7 @@ public void GetHashCode_Test5() TimeSpan ts02 = new TimeSpan(hours, minutes, seconds); OutputHelper.WriteLine(ts01.GetHashCode().ToString() + " == " + ts02.GetHashCode().ToString()); - Assert.Equal(ts01.GetHashCode(), ts02.GetHashCode()); + Assert.AreEqual(ts01.GetHashCode(), ts02.GetHashCode()); } TimeSpan ts1 = new TimeSpan(1, 1, 1); @@ -337,11 +337,11 @@ public void GetHashCode_Test5() ts2.GetHashCode().ToString()); if (ts1 != ts2) { - Assert.NotEqual(ts1.GetHashCode(), ts2.GetHashCode()); + Assert.AreNotEqual(ts1.GetHashCode(), ts2.GetHashCode()); } else { - Assert.Equal(ts1.GetHashCode(), ts2.GetHashCode()); + Assert.AreEqual(ts1.GetHashCode(), ts2.GetHashCode()); } } } @@ -365,11 +365,11 @@ public void Equals_Test6() TimeSpan ts02 = new TimeSpan(hours, minutes, seconds); OutputHelper.WriteLine(ts01.ToString() + " == " + ts02.ToString()); OutputHelper.WriteLine("Expected true"); - Assert.True(ts01.Equals(ts02)); + Assert.IsTrue(ts01.Equals(ts02)); TimeSpan ts03 = new TimeSpan(hours, minutes, seconds); TimeSpan ts04 = new TimeSpan(hours + 1, minutes - 1, seconds + 1); OutputHelper.WriteLine("Expected false"); - Assert.False(ts03.Equals(ts04)); + Assert.IsFalse(ts03.Equals(ts04)); } } @@ -393,7 +393,7 @@ public void ToString_Test7() (hours < 10 ? "0" : "") + hours.ToString() + ":" + (minutes < 10 ? "0" : "") + minutes.ToString() + ":" + (seconds < 10 ? "0" : "") + seconds.ToString(); - Assert.Equal(str, ts01.ToString()); + Assert.AreEqual(str, ts01.ToString()); OutputHelper.WriteLine(str + " == " + ts01.ToString()); } } @@ -430,48 +430,48 @@ public void Add_Test8() int seconds = random.Next(30); TimeSpan ts02 = new TimeSpan(hours, minutes, seconds); TimeSpan ts03 = ts01.Add(ts02); - Assert.True(ts01 != ts03); - Assert.False(CompareTimeSpan(ts01, ts03)); - Assert.True(CompareTimeSpan(ts03, ts01 + ts02)); - Assert.True(ts03.Days == (ts01.Days + ts02.Days)); - Assert.True(ts03.Hours == (ts01.Hours + hours)); - Assert.True(ts03.Minutes == (ts01.Minutes + minutes)); - Assert.True(ts03.Seconds == (ts01.Seconds + seconds)); - Assert.True(ts03.Milliseconds == (ts01.Milliseconds + ts02.Milliseconds)); + Assert.IsTrue(ts01 != ts03); + Assert.IsFalse(CompareTimeSpan(ts01, ts03)); + Assert.IsTrue(CompareTimeSpan(ts03, ts01 + ts02)); + Assert.IsTrue(ts03.Days == (ts01.Days + ts02.Days)); + Assert.IsTrue(ts03.Hours == (ts01.Hours + hours)); + Assert.IsTrue(ts03.Minutes == (ts01.Minutes + minutes)); + Assert.IsTrue(ts03.Seconds == (ts01.Seconds + seconds)); + Assert.IsTrue(ts03.Milliseconds == (ts01.Milliseconds + ts02.Milliseconds)); OutputHelper.WriteLine(b.ToString()); } TimeSpan ts1 = new TimeSpan(2, 2, 2, 2, 2); TimeSpan ts2 = new TimeSpan(0, 0, 0, 0, 999); TimeSpan ts3 = ts1.Add(ts2); - Assert.Equal(ts3.Milliseconds, 1); - Assert.Equal(ts3.Seconds, 3); - Assert.Equal(ts3.Minutes, 2); - Assert.Equal(ts3.Hours, 2); - Assert.Equal(ts3.Days, 2); + Assert.AreEqual(ts3.Milliseconds, 1); + Assert.AreEqual(ts3.Seconds, 3); + Assert.AreEqual(ts3.Minutes, 2); + Assert.AreEqual(ts3.Hours, 2); + Assert.AreEqual(ts3.Days, 2); ts2 = new TimeSpan(0, 0, 0, 58, 0); ts3 = ts1.Add(ts2); - Assert.Equal(ts3.Milliseconds, 2); - Assert.Equal(ts3.Seconds, 0); - Assert.Equal(ts3.Minutes, 3); - Assert.Equal(ts3.Hours, 2); - Assert.Equal(ts3.Days, 2); + Assert.AreEqual(ts3.Milliseconds, 2); + Assert.AreEqual(ts3.Seconds, 0); + Assert.AreEqual(ts3.Minutes, 3); + Assert.AreEqual(ts3.Hours, 2); + Assert.AreEqual(ts3.Days, 2); ts2 = new TimeSpan(0, 0, 59, 0, 0); ts3 = ts1.Add(ts2); - Assert.Equal(ts3.Milliseconds, 2); - Assert.Equal(ts3.Seconds, 2); - Assert.Equal(ts3.Minutes, 1); - Assert.Equal(ts3.Hours, 3); - Assert.Equal(ts3.Days, 2); + Assert.AreEqual(ts3.Milliseconds, 2); + Assert.AreEqual(ts3.Seconds, 2); + Assert.AreEqual(ts3.Minutes, 1); + Assert.AreEqual(ts3.Hours, 3); + Assert.AreEqual(ts3.Days, 2); ts2 = new TimeSpan(0, 22, 0, 0, 0); ts3 = ts1.Add(ts2); - Assert.Equal(ts3.Milliseconds, 2); - Assert.Equal(ts3.Seconds, 2); - Assert.Equal(ts3.Minutes, 2); - Assert.Equal(ts3.Hours, 0); - Assert.Equal(ts3.Days, 3); + Assert.AreEqual(ts3.Milliseconds, 2); + Assert.AreEqual(ts3.Seconds, 2); + Assert.AreEqual(ts3.Minutes, 2); + Assert.AreEqual(ts3.Hours, 0); + Assert.AreEqual(ts3.Days, 3); } [TestMethod] @@ -492,17 +492,17 @@ public void Compare_Test9() int msec = random.Next(999); //milliseconds TimeSpan ts1 = new TimeSpan(day, hour, minute, second, msec); - Assert.Equal(-1, TimeSpan.Compare(ts1, new TimeSpan + Assert.AreEqual(-1, TimeSpan.Compare(ts1, new TimeSpan (day, hour, minute, second + 1, msec))); OutputHelper.WriteLine(TimeSpan.Compare(ts1, new TimeSpan (day, hour, minute, second + 1, msec)).ToString()); - Assert.Equal(1, TimeSpan.Compare(ts1, new TimeSpan + Assert.AreEqual(1, TimeSpan.Compare(ts1, new TimeSpan (day, hour, minute, second, msec - 1))); OutputHelper.WriteLine(TimeSpan.Compare(ts1, new TimeSpan (day, hour, minute, second, msec - 1)).ToString()); - Assert.Equal(0, TimeSpan.Compare(ts1, new TimeSpan + Assert.AreEqual(0, TimeSpan.Compare(ts1, new TimeSpan (day, hour, minute, second, msec))); OutputHelper.WriteLine(TimeSpan.Compare(ts1, new TimeSpan (day, hour, minute, second, msec)).ToString()); @@ -524,9 +524,9 @@ public void Duration_Test10() int minutes = random.Next(59); int seconds = random.Next(59); TimeSpan ts = new TimeSpan(-hours, -minutes, -seconds); - Assert.True(ts.Duration() == new TimeSpan(hours, minutes, seconds)); + Assert.IsTrue(ts.Duration() == new TimeSpan(hours, minutes, seconds)); ts = new TimeSpan(hours, minutes, seconds); - Assert.True(ts.Duration() == new TimeSpan(hours, minutes, seconds)); + Assert.IsTrue(ts.Duration() == new TimeSpan(hours, minutes, seconds)); } } @@ -547,10 +547,10 @@ public void Negate_Test12() int seconds = random.Next(59); TimeSpan tsN = new TimeSpan(-hours, -minutes, -seconds); TimeSpan tsP = new TimeSpan(hours, minutes, seconds); - Assert.True(tsN.Negate() == tsP); - Assert.True(tsP.Negate() == tsN); - Assert.True(tsN.Negate().Negate() == tsN); - Assert.True(tsP.Negate().Negate() == tsP); + Assert.IsTrue(tsN.Negate() == tsP); + Assert.IsTrue(tsP.Negate() == tsN); + Assert.IsTrue(tsN.Negate().Negate() == tsN); + Assert.IsTrue(tsP.Negate().Negate() == tsP); } } @@ -573,55 +573,55 @@ public void Subtract_Test13() int seconds = random.Next(59); TimeSpan ts02 = new TimeSpan(hours, minutes, seconds); TimeSpan ts03 = ts01.Subtract(ts02); - Assert.True((ts01 != ts03) || (ts02.Ticks == 0)); - Assert.False(CompareTimeSpan(ts01, ts03)); - Assert.True(CompareTimeSpan(ts03, ts01 - ts02)); - Assert.True(ts03.Days == (ts01.Days - ts02.Days)); - Assert.True(ts03.Hours == (ts01.Hours - hours)); - Assert.True(ts03.Minutes == (ts01.Minutes - minutes)); - Assert.True(ts03.Seconds == (ts01.Seconds - seconds)); - Assert.True(ts03.Milliseconds == (ts01.Milliseconds - ts02.Milliseconds)); + Assert.IsTrue((ts01 != ts03) || (ts02.Ticks == 0)); + Assert.IsFalse(CompareTimeSpan(ts01, ts03)); + Assert.IsTrue(CompareTimeSpan(ts03, ts01 - ts02)); + Assert.IsTrue(ts03.Days == (ts01.Days - ts02.Days)); + Assert.IsTrue(ts03.Hours == (ts01.Hours - hours)); + Assert.IsTrue(ts03.Minutes == (ts01.Minutes - minutes)); + Assert.IsTrue(ts03.Seconds == (ts01.Seconds - seconds)); + Assert.IsTrue(ts03.Milliseconds == (ts01.Milliseconds - ts02.Milliseconds)); } TimeSpan ts1 = new TimeSpan(2, 2, 2, 2, 2); TimeSpan ts2 = new TimeSpan(0, 0, 0, 0, 3); TimeSpan ts3 = ts1.Subtract(ts2); - Assert.Equal(ts3.Milliseconds, 999); - Assert.Equal(ts3.Seconds, 1); - Assert.Equal(ts3.Minutes, 2); - Assert.Equal(ts3.Hours, 2); - Assert.Equal(ts3.Days, 2); + Assert.AreEqual(ts3.Milliseconds, 999); + Assert.AreEqual(ts3.Seconds, 1); + Assert.AreEqual(ts3.Minutes, 2); + Assert.AreEqual(ts3.Hours, 2); + Assert.AreEqual(ts3.Days, 2); ts2 = new TimeSpan(0, 0, 0, 3, 0); ts3 = ts1.Subtract(ts2); - Assert.Equal(ts3.Milliseconds, 2); - Assert.Equal(ts3.Seconds, 59); - Assert.Equal(ts3.Minutes, 1); - Assert.Equal(ts3.Hours, 2); - Assert.Equal(ts3.Days, 2); + Assert.AreEqual(ts3.Milliseconds, 2); + Assert.AreEqual(ts3.Seconds, 59); + Assert.AreEqual(ts3.Minutes, 1); + Assert.AreEqual(ts3.Hours, 2); + Assert.AreEqual(ts3.Days, 2); ts2 = new TimeSpan(0, 0, 3, 0, 0); ts3 = ts1.Subtract(ts2); - Assert.Equal(ts3.Milliseconds, 2); - Assert.Equal(ts3.Seconds, 2); - Assert.Equal(ts3.Minutes, 59); - Assert.Equal(ts3.Hours, 1); - Assert.Equal(ts3.Days, 2); + Assert.AreEqual(ts3.Milliseconds, 2); + Assert.AreEqual(ts3.Seconds, 2); + Assert.AreEqual(ts3.Minutes, 59); + Assert.AreEqual(ts3.Hours, 1); + Assert.AreEqual(ts3.Days, 2); ts2 = new TimeSpan(0, 3, 0, 0, 0); ts3 = ts1.Subtract(ts2); - Assert.Equal(ts3.Milliseconds, 2); - Assert.Equal(ts3.Seconds, 2); - Assert.Equal(ts3.Minutes, 2); - Assert.Equal(ts3.Hours, 23); - Assert.Equal(ts3.Days, 1); + Assert.AreEqual(ts3.Milliseconds, 2); + Assert.AreEqual(ts3.Seconds, 2); + Assert.AreEqual(ts3.Minutes, 2); + Assert.AreEqual(ts3.Hours, 23); + Assert.AreEqual(ts3.Days, 1); ts2 = new TimeSpan(3, 0, 0, 0, 0); ts3 = ts1.Subtract(ts2); - Assert.Equal(ts3.Milliseconds, -998); - Assert.Equal(ts3.Seconds, -57); - Assert.Equal(ts3.Minutes, -57); - Assert.Equal(ts3.Hours, -21); - Assert.Equal(ts3.Days, 0); + Assert.AreEqual(ts3.Milliseconds, -998); + Assert.AreEqual(ts3.Seconds, -57); + Assert.AreEqual(ts3.Minutes, -57); + Assert.AreEqual(ts3.Hours, -21); + Assert.AreEqual(ts3.Days, 0); } private void FromTicksHelper(int days, int hours, int mins, int secs, int ms) @@ -636,23 +636,23 @@ private void FromTicksHelper(int days, int hours, int mins, int secs, int ms) int dys = (int)(ticks / m_TicksPerDay); OutputHelper.WriteLine(dys.ToString()); - Assert.Equal(ts.Days, dys); + Assert.AreEqual(ts.Days, dys); int hrs = (int)(ticks / m_TicksPerHour) % 24; OutputHelper.WriteLine(hrs.ToString()); - Assert.Equal(ts.Hours, hrs); + Assert.AreEqual(ts.Hours, hrs); int mns = (int)(ticks / m_TicksPerMinute) % 60; OutputHelper.WriteLine(mns.ToString()); - Assert.Equal(ts.Minutes, mns); + Assert.AreEqual(ts.Minutes, mns); int scs = (int)(ticks / m_TicksPerSecond) % 60; OutputHelper.WriteLine(scs.ToString()); - Assert.Equal(ts.Seconds, scs); + Assert.AreEqual(ts.Seconds, scs); int mss = (int)ms % 1000; OutputHelper.WriteLine("MS: " + mss.ToString()); - Assert.Equal(ts.Milliseconds, mss); + Assert.AreEqual(ts.Milliseconds, mss); OutputHelper.WriteLine("Days= " + days + " Hours= " + hours + " Minutes= " + mins + " Secs= " + secs + " ms= " + ms); @@ -698,19 +698,19 @@ private void UnaryHelper(int days, int hours, int mins, int secs, int ms, bool n int m_s = (int)((ticks % m_TicksPerDay % m_TicksPerHour % m_TicksPerMinute % m_TicksPerSecond) / m_TicksPerMillisecond); - Assert.Equal(nts.Days, (neg ? -d : +d)); + Assert.AreEqual(nts.Days, (neg ? -d : +d)); OutputHelper.WriteLine(nts.Days.ToString() + " == " + (neg ? -d : +d).ToString()); - Assert.Equal(nts.Hours, (neg ? -h : +h)); + Assert.AreEqual(nts.Hours, (neg ? -h : +h)); OutputHelper.WriteLine(nts.Hours.ToString() + " == " + ((neg ? -h : +h)).ToString()); - Assert.Equal(nts.Minutes, (neg ? -m : +m)); + Assert.AreEqual(nts.Minutes, (neg ? -m : +m)); OutputHelper.WriteLine(nts.Minutes.ToString() + " == " + ((neg ? -m : +m)).ToString()); - Assert.Equal(nts.Seconds, (neg ? -s : +s)); + Assert.AreEqual(nts.Seconds, (neg ? -s : +s)); OutputHelper.WriteLine(nts.Seconds.ToString() + " == " + ((neg ? -s : +s)).ToString()); - Assert.Equal(nts.Milliseconds, (neg ? -m_s : +m_s)); + Assert.AreEqual(nts.Milliseconds, (neg ? -m_s : +m_s)); OutputHelper.WriteLine(nts.Milliseconds.ToString() + " == " + ((neg ? -m_s : +m_s)).ToString()); OutputHelper.WriteLine(ts.ToString()); @@ -771,19 +771,19 @@ private void OSubAddHelper(int days1, int hours1, int mins1, int secs1, TimeSpan ts2 = new TimeSpan(days2, hours2, mins2, secs2, ms2); TimeSpan ts3 = (add ? (ts1 + ts2) : (ts1 - ts2)); - Assert.Equal(ts3.Days, d1); + Assert.AreEqual(ts3.Days, d1); OutputHelper.WriteLine(ts3.Days.ToString() + " == " + d1.ToString()); - Assert.Equal(ts3.Hours, h1); + Assert.AreEqual(ts3.Hours, h1); OutputHelper.WriteLine(ts3.Hours.ToString() + " == " + h1.ToString()); - Assert.Equal(ts3.Minutes, m1); + Assert.AreEqual(ts3.Minutes, m1); OutputHelper.WriteLine(ts3.Minutes.ToString() + " == " + m1.ToString()); - Assert.Equal(ts3.Seconds, s1); + Assert.AreEqual(ts3.Seconds, s1); OutputHelper.WriteLine(ts3.Seconds.ToString() + " == " + s1.ToString()); - Assert.Equal(ts3.Milliseconds, m_s1); + Assert.AreEqual(ts3.Milliseconds, m_s1); OutputHelper.WriteLine(ts3.Milliseconds.ToString() + " == " + m_s1.ToString()); OutputHelper.WriteLine(ts1.ToString()); @@ -875,7 +875,7 @@ private void EqualityHelper(int days1, int hours1, int mins1, int secs1, int ms1 TimeSpan ts1 = new TimeSpan(days1, hours1, mins1, secs1, ms1); TimeSpan ts2 = new TimeSpan(days2, hours2, mins2, secs2, ms2); - Assert.True((ts1 == ts2) == expected); + Assert.IsTrue((ts1 == ts2) == expected); } [TestMethod] @@ -915,7 +915,7 @@ private void InequalityHelper(int days1, int hours1, int mins1, int secs1, int m { TimeSpan ts1 = new TimeSpan(days1, hours1, mins1, secs1, ms1); TimeSpan ts2 = new TimeSpan(days2, hours2, mins2, secs2, ms2); - Assert.True((ts1 != ts2) == expected); + Assert.IsTrue((ts1 != ts2) == expected); } @@ -999,17 +999,17 @@ public void op_LessThan_Test21() int im = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); int ise = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); int ims = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims, false, 0)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id + 1, ih, im, ise, ims, true, 0)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih + 1, im, ise, ims, true, 0)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im + 1, ise, ims, true, 0)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise + 1, ims, true, 0)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims + 1, true, 0)); - Assert.True(LTGTHelper(id + 1, ih, im, ise, ims, id, ih, im, ise, ims, false, 0)); - Assert.True(LTGTHelper(id, ih + 1, im, ise, ims, id, ih, im, ise, ims, false, 0)); - Assert.True(LTGTHelper(id, ih, im + 1, ise, ims, id, ih, im, ise, ims, false, 0)); - Assert.True(LTGTHelper(id, ih, im, ise + 1, ims, id, ih, im, ise, ims, false, 0)); - Assert.True(LTGTHelper(id, ih, im, ise, ims + 1, id, ih, im, ise, ims, false, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims, false, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id + 1, ih, im, ise, ims, true, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih + 1, im, ise, ims, true, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im + 1, ise, ims, true, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise + 1, ims, true, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims + 1, true, 0)); + Assert.IsTrue(LTGTHelper(id + 1, ih, im, ise, ims, id, ih, im, ise, ims, false, 0)); + Assert.IsTrue(LTGTHelper(id, ih + 1, im, ise, ims, id, ih, im, ise, ims, false, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im + 1, ise, ims, id, ih, im, ise, ims, false, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise + 1, ims, id, ih, im, ise, ims, false, 0)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims + 1, id, ih, im, ise, ims, false, 0)); } } @@ -1031,17 +1031,17 @@ public void op_LessThanOrEqual_Test22() int im = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); int ise = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); int ims = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims, true, 1)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id + 1, ih, im, ise, ims, true, 1)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih + 1, im, ise, ims, true, 1)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im + 1, ise, ims, true, 1)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise + 1, ims, true, 1)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims + 1, true, 1)); - Assert.True(LTGTHelper(id + 1, ih, im, ise, ims, id, ih, im, ise, ims, false, 1)); - Assert.True(LTGTHelper(id, ih + 1, im, ise, ims, id, ih, im, ise, ims, false, 1)); - Assert.True(LTGTHelper(id, ih, im + 1, ise, ims, id, ih, im, ise, ims, false, 1)); - Assert.True(LTGTHelper(id, ih, im, ise + 1, ims, id, ih, im, ise, ims, false, 1)); - Assert.True(LTGTHelper(id, ih, im, ise, ims + 1, id, ih, im, ise, ims, false, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims, true, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id + 1, ih, im, ise, ims, true, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih + 1, im, ise, ims, true, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im + 1, ise, ims, true, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise + 1, ims, true, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims + 1, true, 1)); + Assert.IsTrue(LTGTHelper(id + 1, ih, im, ise, ims, id, ih, im, ise, ims, false, 1)); + Assert.IsTrue(LTGTHelper(id, ih + 1, im, ise, ims, id, ih, im, ise, ims, false, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im + 1, ise, ims, id, ih, im, ise, ims, false, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise + 1, ims, id, ih, im, ise, ims, false, 1)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims + 1, id, ih, im, ise, ims, false, 1)); } } @@ -1063,17 +1063,17 @@ public void op_GreaterThan_Test23() int im = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); int ise = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); int ims = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims, false, 2)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id + 1, ih, im, ise, ims, false, 2)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih + 1, im, ise, ims, false, 2)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im + 1, ise, ims, false, 2)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise + 1, ims, false, 2)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims + 1, false, 2)); - Assert.True(LTGTHelper(id + 1, ih, im, ise, ims, id, ih, im, ise, ims, true, 2)); - Assert.True(LTGTHelper(id, ih + 1, im, ise, ims, id, ih, im, ise, ims, true, 2)); - Assert.True(LTGTHelper(id, ih, im + 1, ise, ims, id, ih, im, ise, ims, true, 2)); - Assert.True(LTGTHelper(id, ih, im, ise + 1, ims, id, ih, im, ise, ims, true, 2)); - Assert.True(LTGTHelper(id, ih, im, ise, ims + 1, id, ih, im, ise, ims, true, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims, false, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id + 1, ih, im, ise, ims, false, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih + 1, im, ise, ims, false, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im + 1, ise, ims, false, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise + 1, ims, false, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims + 1, false, 2)); + Assert.IsTrue(LTGTHelper(id + 1, ih, im, ise, ims, id, ih, im, ise, ims, true, 2)); + Assert.IsTrue(LTGTHelper(id, ih + 1, im, ise, ims, id, ih, im, ise, ims, true, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im + 1, ise, ims, id, ih, im, ise, ims, true, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise + 1, ims, id, ih, im, ise, ims, true, 2)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims + 1, id, ih, im, ise, ims, true, 2)); } } @@ -1095,17 +1095,17 @@ public void op_GreaterThanOrEqual_Test24() int im = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); int ise = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); int ims = (random.Next(1) == 0 ? -1 : 1) * random.Next(mx); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims, true, 3)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id + 1, ih, im, ise, ims, false, 3)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih + 1, im, ise, ims, false, 3)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im + 1, ise, ims, false, 3)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise + 1, ims, false, 3)); - Assert.True(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims + 1, false, 3)); - Assert.True(LTGTHelper(id + 1, ih, im, ise, ims, id, ih, im, ise, ims, true, 3)); - Assert.True(LTGTHelper(id, ih + 1, im, ise, ims, id, ih, im, ise, ims, true, 3)); - Assert.True(LTGTHelper(id, ih, im + 1, ise, ims, id, ih, im, ise, ims, true, 3)); - Assert.True(LTGTHelper(id, ih, im, ise + 1, ims, id, ih, im, ise, ims, true, 3)); - Assert.True(LTGTHelper(id, ih, im, ise, ims + 1, id, ih, im, ise, ims, true, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims, true, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id + 1, ih, im, ise, ims, false, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih + 1, im, ise, ims, false, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im + 1, ise, ims, false, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise + 1, ims, false, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims, id, ih, im, ise, ims + 1, false, 3)); + Assert.IsTrue(LTGTHelper(id + 1, ih, im, ise, ims, id, ih, im, ise, ims, true, 3)); + Assert.IsTrue(LTGTHelper(id, ih + 1, im, ise, ims, id, ih, im, ise, ims, true, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im + 1, ise, ims, id, ih, im, ise, ims, true, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise + 1, ims, id, ih, im, ise, ims, true, 3)); + Assert.IsTrue(LTGTHelper(id, ih, im, ise, ims + 1, id, ih, im, ise, ims, true, 3)); } } @@ -1118,7 +1118,7 @@ private void TicksHelper(int days, int hours, int mins, int secs, int ms) mins * m_TicksPerMinute + secs * m_TicksPerSecond + ms * m_TicksPerMillisecond; - Assert.Equal(ts.Ticks, ticks); + Assert.AreEqual(ts.Ticks, ticks); OutputHelper.WriteLine(ts.Ticks.ToString() + " == " + ticks.ToString()); } [TestMethod] @@ -1186,15 +1186,15 @@ public void Equals() if (test.Obj is TimeSpan) { TimeSpan timeSpan2 = (TimeSpan)test.Obj; - Assert.Equal(test.Expected, TimeSpan.Equals(test.TimeSpan1, timeSpan2)); - Assert.Equal(test.Expected, test.TimeSpan1.Equals(timeSpan2)); - Assert.Equal(test.Expected, (TimeSpan)test.TimeSpan1 == timeSpan2); - Assert.Equal(!test.Expected, (TimeSpan)test.TimeSpan1 != timeSpan2); + Assert.AreEqual(test.Expected, TimeSpan.Equals(test.TimeSpan1, timeSpan2)); + Assert.AreEqual(test.Expected, test.TimeSpan1.Equals(timeSpan2)); + Assert.AreEqual(test.Expected, (TimeSpan)test.TimeSpan1 == timeSpan2); + Assert.AreEqual(!test.Expected, (TimeSpan)test.TimeSpan1 != timeSpan2); - Assert.Equal(test.Expected, test.TimeSpan1.GetHashCode().Equals(timeSpan2.GetHashCode())); + Assert.AreEqual(test.Expected, test.TimeSpan1.GetHashCode().Equals(timeSpan2.GetHashCode())); } - Assert.Equal(test.Expected, test.TimeSpan1.Equals(test.Obj)); + Assert.AreEqual(test.Expected, test.TimeSpan1.Equals(test.Obj)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestTypeTests.cs b/Tests/NFUnitTestSystemLib/UnitTestTypeTests.cs index e9d63482..0260963e 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestTypeTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestTypeTests.cs @@ -45,142 +45,142 @@ public void Number_ToString_Test() { // if the negative number can not be truncated to the range specified it // will display its full hex value - Assert.Equal("fe", ((sbyte)-2).ToString("x02")); - Assert.Equal("36", ((byte)0x36).ToString("x02")); - Assert.Equal("FF", ((byte)255).ToString("X2")); - Assert.Equal("fffd", ((short)-3).ToString("x04")); - Assert.Equal("3049", ((ushort)0x3049).ToString("x4")); - Assert.Equal("fc00", ((short)-1024).ToString("x02")); - Assert.Equal("fffffffc", ((int)-4).ToString("x8")); - Assert.Equal("00004494", ((uint)0x4494).ToString("x8")); - Assert.Equal("fffffffc", ((int)-4).ToString("x04")); - Assert.Equal("fffffffffffffffb", ((long)-5).ToString("x016")); - Assert.Equal("1234567890123456", ((ulong)0x1234567890123456).ToString("x16")); + Assert.AreEqual("fe", ((sbyte)-2).ToString("x02")); + Assert.AreEqual("36", ((byte)0x36).ToString("x02")); + Assert.AreEqual("FF", ((byte)255).ToString("X2")); + Assert.AreEqual("fffd", ((short)-3).ToString("x04")); + Assert.AreEqual("3049", ((ushort)0x3049).ToString("x4")); + Assert.AreEqual("fc00", ((short)-1024).ToString("x02")); + Assert.AreEqual("fffffffc", ((int)-4).ToString("x8")); + Assert.AreEqual("00004494", ((uint)0x4494).ToString("x8")); + Assert.AreEqual("fffffffc", ((int)-4).ToString("x04")); + Assert.AreEqual("fffffffffffffffb", ((long)-5).ToString("x016")); + Assert.AreEqual("1234567890123456", ((ulong)0x1234567890123456).ToString("x16")); // you should not be able to truncate the value only leading zeros - Assert.Equal("1234567890123456", ((ulong)0x1234567890123456).ToString("x06")); - Assert.Equal("34567890123456", ((ulong)0x0034567890123456).ToString("x14")); + Assert.AreEqual("1234567890123456", ((ulong)0x1234567890123456).ToString("x06")); + Assert.AreEqual("34567890123456", ((ulong)0x0034567890123456).ToString("x14")); string tst = 3210.ToString("D"); OutputHelper.WriteLine($"3210: {tst}"); - Assert.Equal("3210", tst); + Assert.AreEqual("3210", tst); tst = (-3210).ToString("d"); OutputHelper.WriteLine($"-3210: {tst}"); - Assert.Equal("-3210", tst); + Assert.AreEqual("-3210", tst); tst = 3210.ToString("d06"); OutputHelper.WriteLine($"003210: {tst}"); - Assert.Equal("003210", tst); + Assert.AreEqual("003210", tst); tst = (-3210).ToString("d06"); OutputHelper.WriteLine($"-003210: {tst}"); - Assert.Equal("-003210", tst); + Assert.AreEqual("-003210", tst); tst = 3210.ToString("d1"); OutputHelper.WriteLine($"3210: {tst}"); - Assert.Equal("3210", tst); + Assert.AreEqual("3210", tst); tst = (-3210).ToString("d1"); OutputHelper.WriteLine($"-3210: {tst}"); - Assert.Equal("-3210", tst); + Assert.AreEqual("-3210", tst); tst = 3210.ToString("g"); OutputHelper.WriteLine($"3210 {tst}"); - Assert.Equal("3210", tst); + Assert.AreEqual("3210", tst); tst = (-3210).ToString("g"); OutputHelper.WriteLine($"-3210 {tst}"); - Assert.Equal("-3210", tst); - - Assert.Equal("NaN", float.NaN.ToString()); - Assert.Equal("Infinity", float.PositiveInfinity.ToString()); - //Assert.Equal("-Infinity", float.NegativeInfinity.ToString(), "float negative infinity test"); - - Assert.Equal("NaN", double.NaN.ToString()); - Assert.Equal("Infinity", double.PositiveInfinity.ToString()); - //Assert.Equal("-Infinity", double.NegativeInfinity.ToString(), "double negative infinity"); - - Assert.Equal("Da1x", (1).ToString("Da1x")); - Assert.Equal("1", (1).ToString("D")); - Assert.Equal("-1", (-1).ToString("D")); - Assert.Equal("1234", (1234).ToString("D")); - Assert.Equal("-1234", (-1234).ToString("D")); - Assert.Equal("001234", (1234).ToString("D6")); - Assert.Equal("-001234", (-1234).ToString("D6")); - Assert.Equal("2147483647", (Int32.MaxValue).ToString("D")); - Assert.Equal("-2147483648", (Int32.MinValue).ToString("D")); - Assert.Equal("000000000002147483647", (Int32.MaxValue).ToString("D21")); - Assert.Equal("-000000000002147483648", (Int32.MinValue).ToString("D21")); - Assert.Equal("9223372036854775807", (Int64.MaxValue).ToString("D")); - Assert.Equal("-9223372036854775808", (Int64.MinValue).ToString("D")); - Assert.Equal("009223372036854775807", (Int64.MaxValue).ToString("D21")); - Assert.Equal("-009223372036854775808", (Int64.MinValue).ToString("D21")); - Assert.Equal("2147483747", ((Int64)Int32.MaxValue + 100).ToString("D")); - Assert.Equal("-2147483748", ((Int64)Int32.MinValue - 100).ToString("D")); - Assert.Equal("000000000002147483747", ((Int64)Int32.MaxValue + 100).ToString("D21")); - Assert.Equal("-000000000002147483748", ((Int64)Int32.MinValue - 100).ToString("D21")); - - Assert.Equal("1234.57", (1234.567).ToString("F")); - Assert.Equal("-1234.57", (-1234.567).ToString("F")); - Assert.Equal("1235", (1234.567).ToString("F0")); - Assert.Equal("-1235", (-1234.567).ToString("F0")); - Assert.Equal("1234.0", (1234).ToString("F1")); - Assert.Equal("-1234.0", (-1234).ToString("F1")); - Assert.Equal("1234.5600", (1234.56).ToString("F4")); - Assert.Equal("-1234.5600", (-1234.56).ToString("F4")); - Assert.Equal("1234.6", (1234.56).ToString("F1")); - Assert.Equal("-1234.6", (-1234.56).ToString("F1")); - Assert.Equal("1234.0", (1234.0056).ToString("F1")); - Assert.Equal("-1234.0", (-1234.0056).ToString("F1")); - Assert.Equal("1", (1).ToString()); - Assert.Equal("1", (1).ToString((string)null)); - Assert.Equal("1", (1).ToString(String.Empty)); - Assert.Equal("1234.567", (1234.567).ToString()); - Assert.Equal("123.456", (123.456).ToString("G")); - Assert.Equal("-123.456", (-123.456).ToString("G")); - Assert.Equal("1.2E+02", (123.4546).ToString("G2")); - Assert.Equal("-1.2E+02", (-123.4546).ToString("G2")); - Assert.Equal("123.5", (123.4546).ToString("G4")); - Assert.Equal("-123.5", (-123.4546).ToString("G4")); - Assert.Equal("123.4546", (123.4546).ToString("G10")); - Assert.Equal("-123.4546", (-123.4546).ToString("G10")); - Assert.Equal("100", (99.9999).ToString("G4")); - Assert.Equal("-100", (-99.9999).ToString("G4")); - Assert.Equal("1234567890", (1234567890).ToString("G")); - Assert.Equal("-1234567890", (-1234567890).ToString("G")); - Assert.Equal("1.235E+09", (1234567890).ToString("G4")); - Assert.Equal("-1.235E+09", (-1234567890).ToString("G4")); - Assert.Equal("9.877E+09", (9876543210).ToString("G4")); - Assert.Equal("-9.877E+09", (-9876543210).ToString("G4")); - Assert.Equal("1234567890", (1234567890).ToString("G15")); - Assert.Equal("-1234567890", (-1234567890).ToString("G15")); - Assert.Equal("1,234.57", (1234.567).ToString("N")); - Assert.Equal("-1,234.57", (-1234.567).ToString("N")); - Assert.Equal("0", (0).ToString("N0")); - Assert.Equal("1,234", (1234).ToString("N0")); - Assert.Equal("-1,234", (-1234).ToString("N0")); - Assert.Equal("12.0", (12).ToString("N1")); - Assert.Equal("-12.0", (-12).ToString("N1")); - Assert.Equal("1,234.0", (1234).ToString("N1")); - Assert.Equal("-1,234.0", (-1234).ToString("N1")); - Assert.Equal("1,234.560", (1234.56).ToString("N3")); - Assert.Equal("-1,234.560", (-1234.56).ToString("N3")); - Assert.Equal("34,561,234.560", (34561234.56).ToString("N3")); - Assert.Equal("-34,561,234.560", (-34561234.56).ToString("N3")); - - Assert.Equal("FF", (255).ToString("X")); - Assert.Equal("1", ((Int32)1).ToString("X")); - Assert.Equal("ffffffff", ((Int32)(-1)).ToString("x")); - Assert.Equal("1", (unchecked((byte)1)).ToString("x")); - Assert.Equal("ff", (unchecked((byte)(-1))).ToString("x")); - Assert.Equal("1", ((short)1).ToString("x")); - Assert.Equal("01", ((short)1).ToString("x2")); - Assert.Equal("ffff", ((short)(-1)).ToString("x")); - Assert.Equal("00ff", (255).ToString("x4")); - Assert.Equal("FFFFFFFF", ((Int32)(-1)).ToString("X4")); - Assert.Equal("7ffffffffffffff5", (Int64.MaxValue - 10).ToString("x")); - Assert.Equal("a", ((Int64)10).ToString("x")); - Assert.Equal("0000a", ((Int64)10).ToString("x5")); + Assert.AreEqual("-3210", tst); + + Assert.AreEqual("NaN", float.NaN.ToString()); + Assert.AreEqual("Infinity", float.PositiveInfinity.ToString()); + //Assert.AreEqual("-Infinity", float.NegativeInfinity.ToString(), "float negative infinity test"); + + Assert.AreEqual("NaN", double.NaN.ToString()); + Assert.AreEqual("Infinity", double.PositiveInfinity.ToString()); + //Assert.AreEqual("-Infinity", double.NegativeInfinity.ToString(), "double negative infinity"); + + Assert.AreEqual("Da1x", (1).ToString("Da1x")); + Assert.AreEqual("1", (1).ToString("D")); + Assert.AreEqual("-1", (-1).ToString("D")); + Assert.AreEqual("1234", (1234).ToString("D")); + Assert.AreEqual("-1234", (-1234).ToString("D")); + Assert.AreEqual("001234", (1234).ToString("D6")); + Assert.AreEqual("-001234", (-1234).ToString("D6")); + Assert.AreEqual("2147483647", (Int32.MaxValue).ToString("D")); + Assert.AreEqual("-2147483648", (Int32.MinValue).ToString("D")); + Assert.AreEqual("000000000002147483647", (Int32.MaxValue).ToString("D21")); + Assert.AreEqual("-000000000002147483648", (Int32.MinValue).ToString("D21")); + Assert.AreEqual("9223372036854775807", (Int64.MaxValue).ToString("D")); + Assert.AreEqual("-9223372036854775808", (Int64.MinValue).ToString("D")); + Assert.AreEqual("009223372036854775807", (Int64.MaxValue).ToString("D21")); + Assert.AreEqual("-009223372036854775808", (Int64.MinValue).ToString("D21")); + Assert.AreEqual("2147483747", ((Int64)Int32.MaxValue + 100).ToString("D")); + Assert.AreEqual("-2147483748", ((Int64)Int32.MinValue - 100).ToString("D")); + Assert.AreEqual("000000000002147483747", ((Int64)Int32.MaxValue + 100).ToString("D21")); + Assert.AreEqual("-000000000002147483748", ((Int64)Int32.MinValue - 100).ToString("D21")); + + Assert.AreEqual("1234.57", (1234.567).ToString("F")); + Assert.AreEqual("-1234.57", (-1234.567).ToString("F")); + Assert.AreEqual("1235", (1234.567).ToString("F0")); + Assert.AreEqual("-1235", (-1234.567).ToString("F0")); + Assert.AreEqual("1234.0", (1234).ToString("F1")); + Assert.AreEqual("-1234.0", (-1234).ToString("F1")); + Assert.AreEqual("1234.5600", (1234.56).ToString("F4")); + Assert.AreEqual("-1234.5600", (-1234.56).ToString("F4")); + Assert.AreEqual("1234.6", (1234.56).ToString("F1")); + Assert.AreEqual("-1234.6", (-1234.56).ToString("F1")); + Assert.AreEqual("1234.0", (1234.0056).ToString("F1")); + Assert.AreEqual("-1234.0", (-1234.0056).ToString("F1")); + Assert.AreEqual("1", (1).ToString()); + Assert.AreEqual("1", (1).ToString((string)null)); + Assert.AreEqual("1", (1).ToString(String.Empty)); + Assert.AreEqual("1234.567", (1234.567).ToString()); + Assert.AreEqual("123.456", (123.456).ToString("G")); + Assert.AreEqual("-123.456", (-123.456).ToString("G")); + Assert.AreEqual("1.2E+02", (123.4546).ToString("G2")); + Assert.AreEqual("-1.2E+02", (-123.4546).ToString("G2")); + Assert.AreEqual("123.5", (123.4546).ToString("G4")); + Assert.AreEqual("-123.5", (-123.4546).ToString("G4")); + Assert.AreEqual("123.4546", (123.4546).ToString("G10")); + Assert.AreEqual("-123.4546", (-123.4546).ToString("G10")); + Assert.AreEqual("100", (99.9999).ToString("G4")); + Assert.AreEqual("-100", (-99.9999).ToString("G4")); + Assert.AreEqual("1234567890", (1234567890).ToString("G")); + Assert.AreEqual("-1234567890", (-1234567890).ToString("G")); + Assert.AreEqual("1.235E+09", (1234567890).ToString("G4")); + Assert.AreEqual("-1.235E+09", (-1234567890).ToString("G4")); + Assert.AreEqual("9.877E+09", (9876543210).ToString("G4")); + Assert.AreEqual("-9.877E+09", (-9876543210).ToString("G4")); + Assert.AreEqual("1234567890", (1234567890).ToString("G15")); + Assert.AreEqual("-1234567890", (-1234567890).ToString("G15")); + Assert.AreEqual("1,234.57", (1234.567).ToString("N")); + Assert.AreEqual("-1,234.57", (-1234.567).ToString("N")); + Assert.AreEqual("0", (0).ToString("N0")); + Assert.AreEqual("1,234", (1234).ToString("N0")); + Assert.AreEqual("-1,234", (-1234).ToString("N0")); + Assert.AreEqual("12.0", (12).ToString("N1")); + Assert.AreEqual("-12.0", (-12).ToString("N1")); + Assert.AreEqual("1,234.0", (1234).ToString("N1")); + Assert.AreEqual("-1,234.0", (-1234).ToString("N1")); + Assert.AreEqual("1,234.560", (1234.56).ToString("N3")); + Assert.AreEqual("-1,234.560", (-1234.56).ToString("N3")); + Assert.AreEqual("34,561,234.560", (34561234.56).ToString("N3")); + Assert.AreEqual("-34,561,234.560", (-34561234.56).ToString("N3")); + + Assert.AreEqual("FF", (255).ToString("X")); + Assert.AreEqual("1", ((Int32)1).ToString("X")); + Assert.AreEqual("ffffffff", ((Int32)(-1)).ToString("x")); + Assert.AreEqual("1", (unchecked((byte)1)).ToString("x")); + Assert.AreEqual("ff", (unchecked((byte)(-1))).ToString("x")); + Assert.AreEqual("1", ((short)1).ToString("x")); + Assert.AreEqual("01", ((short)1).ToString("x2")); + Assert.AreEqual("ffff", ((short)(-1)).ToString("x")); + Assert.AreEqual("00ff", (255).ToString("x4")); + Assert.AreEqual("FFFFFFFF", ((Int32)(-1)).ToString("X4")); + Assert.AreEqual("7ffffffffffffff5", (Int64.MaxValue - 10).ToString("x")); + Assert.AreEqual("a", ((Int64)10).ToString("x")); + Assert.AreEqual("0000a", ((Int64)10).ToString("x5")); } @@ -222,7 +222,7 @@ public void SystemType1_GetTypeNew_Test() OutputHelper.WriteLine("Since NoneSuch does not exist in this assembly, "); OutputHelper.WriteLine("GetType throws a TypeLoadException."); - Assert.Throws(typeof(NullReferenceException), () => + Assert.ThrowsException(typeof(NullReferenceException), () => { Type myType5 = Type.GetType("NoneSuch"); OutputHelper.WriteLine("The full name is " + myType5.FullName); @@ -241,21 +241,21 @@ public void SystemType1_Type_Names_Test() Assert.IsType(myType0, myType1); // names must be compatible and composable - Assert.Equal(myType0.Name, myType1.Name); + Assert.AreEqual(myType0.Name, myType1.Name); // names must be compatible and composable - Assert.Equal(myType0.FullName, myType1.FullName); + Assert.AreEqual(myType0.FullName, myType1.FullName); // assembly must be the same - Assert.True(myType0.Assembly == myType1.Assembly); + Assert.IsTrue(myType0.Assembly == myType1.Assembly); // type must come from assembly it is supposed to come from - Assert.True(Int32Assm == myType0.Assembly); + Assert.IsTrue(Int32Assm == myType0.Assembly); // verify that the long name is corrent string fullAssmName = Int32Assm.FullName; - Assert.Equal(myType0.AssemblyQualifiedName, (myType0.FullName + ", " + fullAssmName)); + Assert.AreEqual(myType0.AssemblyQualifiedName, (myType0.FullName + ", " + fullAssmName)); } [TestMethod] @@ -269,12 +269,12 @@ public void SystemType2_Assembly_Test() Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.Assembly.FullName); - Assert.Equal(myType1.Assembly.FullName, "mscorlib, Version=" + myType1.Assembly.GetName().Version.ToString()); + Assert.AreEqual(myType1.Assembly.FullName, "mscorlib, Version=" + myType1.Assembly.GetName().Version.ToString()); TestObject1 testTestObject1 = new TestObject1(); Type myType2 = testTestObject1.GetType(); OutputHelper.WriteLine("The full name is " + myType2.Assembly.FullName); - Assert.Equal(myType2.Assembly.FullName, "NFUnitTest, Version=" + myType2.Assembly.GetName().Version.ToString()); + Assert.AreEqual(myType2.Assembly.FullName, "NFUnitTest, Version=" + myType2.Assembly.GetName().Version.ToString()); } [TestMethod] @@ -306,7 +306,7 @@ public void SystemType4_DeclaringType_Test() Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.FullName); - Assert.True(myType1.DeclaringType == null); + Assert.IsTrue(myType1.DeclaringType == null); // As there is no instance of this, the test will fail, commenting it. //TestObject1 testTestObject1 = new TestObject1(); @@ -327,7 +327,7 @@ public void SystemType5_GetConstructor_Test() object[] value5Arr = new object[] { 5 }; TestObject2 testTestObject3 = (TestObject2)myType2.GetConstructor(typeOfInt32Arr).Invoke(value5Arr); - Assert.Equal(testTestObject2.m_data, testTestObject3.m_data); + Assert.AreEqual(testTestObject2.m_data, testTestObject3.m_data); } [TestMethod] @@ -345,7 +345,7 @@ public void SystemType6_GetElementType_Test() Type int32ArrType = int32Arr.GetType(); Assert.IsType(myType1, int32ArrType.GetElementType()); - Assert.True(myType1.GetElementType() == null); + Assert.IsTrue(myType1.GetElementType() == null); } [TestMethod] @@ -357,7 +357,7 @@ public void SystemType7_GetField_Test() Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.FullName); - Assert.True(myType1.GetField("m_data") == null); + Assert.IsTrue(myType1.GetField("m_data") == null); OutputHelper.WriteLine(" TestObject2 type has one data member \"m_data\" of type Int32."); TestObject2 testTestObject2 = new TestObject2(5); @@ -369,33 +369,33 @@ public void SystemType7_GetField_Test() BindingFlags.Public | BindingFlags.Instance).FieldType, myType1); OutputHelper.WriteLine(" Check that value in m_data is 5 ( becuase we called new TestObject2(5))"); - Assert.Equal((int)myType2.GetField("m_data", BindingFlags.IgnoreCase | + Assert.AreEqual((int)myType2.GetField("m_data", BindingFlags.IgnoreCase | BindingFlags.GetField | BindingFlags.Public | BindingFlags.Instance).GetValue(testTestObject2), 5); OutputHelper.WriteLine(" Check that m_data is a field"); - Assert.True(myType2.GetField("m_data").MemberType == MemberTypes.Field); + Assert.IsTrue(myType2.GetField("m_data").MemberType == MemberTypes.Field); OutputHelper.WriteLine(" Check that field m_data has Name \"m_data\""); - Assert.Equal(myType2.GetField("m_data").Name, "m_data"); + Assert.AreEqual(myType2.GetField("m_data").Name, "m_data"); OutputHelper.WriteLine(" Check that misspelling of m_data return NULL."); - Assert.True(null == myType2.GetField("data")); + Assert.IsTrue(null == myType2.GetField("data")); OutputHelper.WriteLine(" Checks that case misspelling of m_data return NULL if flag BindingFlags.IgnoreCase not specified."); - Assert.True(null == myType2.GetField("m_Data")); + Assert.IsTrue(null == myType2.GetField("m_Data")); OutputHelper.WriteLine("Check retrieval with BindingFlags.IgnoreCase. If flag BindingFlags.IgnoreCase is ised, then the case should be ignored. We should get the same type information."); FieldInfo fInfo_m_Data = myType2.GetField("m_Data", BindingFlags.IgnoreCase | BindingFlags.GetField | BindingFlags.Public | BindingFlags.Instance); FieldInfo fInfo_m_data = myType2.GetField("m_data"); - Assert.NotNull(fInfo_m_Data); - Assert.NotNull(fInfo_m_data); - Assert.True(fInfo_m_Data.Name.Equals(fInfo_m_data.Name)); + Assert.IsNotNull(fInfo_m_Data); + Assert.IsNotNull(fInfo_m_data); + Assert.IsTrue(fInfo_m_Data.Name.Equals(fInfo_m_data.Name)); OutputHelper.WriteLine(" Indirectly set m_data in testTestObject2 to 6 and then check it."); myType2.GetField("m_data").SetValue(testTestObject2, 6); - Assert.Equal((int)myType2.GetField("m_data").GetValue(testTestObject2), 6); - Assert.Equal(testTestObject2.m_data, 6); + Assert.AreEqual((int)myType2.GetField("m_data").GetValue(testTestObject2), 6); + Assert.AreEqual(testTestObject2.m_data, 6); } [TestMethod] @@ -408,16 +408,16 @@ public void SystemType8_GetFields_Test() Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.FullName); - Assert.Null(myType1.GetField("m_data")); + Assert.IsNull(myType1.GetField("m_data")); TestObject2 testTestObject2 = new TestObject2(5); Type myType2 = testTestObject2.GetType(); OutputHelper.WriteLine("The full name is " + myType2.FullName); Assert.IsType(myType2.GetField("m_data").FieldType, myType1); - Assert.Equal((int)myType2.GetField("m_data").GetValue(testTestObject2), 5); - Assert.True(myType2.GetField("m_data").MemberType == MemberTypes.Field); - Assert.Equal(myType2.GetField("m_data").Name, "m_data"); + Assert.AreEqual((int)myType2.GetField("m_data").GetValue(testTestObject2), 5); + Assert.IsTrue(myType2.GetField("m_data").MemberType == MemberTypes.Field); + Assert.AreEqual(myType2.GetField("m_data").Name, "m_data"); myType2.GetField("m_data").SetValue(testTestObject2, 6); - Assert.Equal((int)myType2.GetField("m_data").GetValue(testTestObject2), 6); + Assert.AreEqual((int)myType2.GetField("m_data").GetValue(testTestObject2), 6); } [TestMethod] @@ -429,7 +429,7 @@ public void SystemType9_GetInterfaces_Test() Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.FullName); - Assert.Equal(myType1.GetInterfaces().Length, 0); + Assert.AreEqual(myType1.GetInterfaces().Length, 0); TestObject2 testTestObject2 = new TestObject2(5); Type myType2 = testTestObject2.GetType(); OutputHelper.WriteLine("The full name is " + myType2.FullName); @@ -451,16 +451,16 @@ public void SystemType10_GetMethod_Test() Type myType2 = testTestObject2.GetType(); OutputHelper.WriteLine("The full name is " + myType2.FullName); MethodInfo methodInfo1 = myType2.GetMethod("Method2"); - Assert.Equal(methodInfo1.IsAbstract, false); - Assert.Equal(methodInfo1.IsFinal, false); - Assert.Equal(methodInfo1.IsPublic, true); - Assert.Equal(methodInfo1.IsStatic, false); - Assert.Equal(methodInfo1.IsVirtual, false); - Assert.True(methodInfo1.MemberType == MemberTypes.Method); - Assert.Equal(methodInfo1.Name, "Method2"); + Assert.AreEqual(methodInfo1.IsAbstract, false); + Assert.AreEqual(methodInfo1.IsFinal, false); + Assert.AreEqual(methodInfo1.IsPublic, true); + Assert.AreEqual(methodInfo1.IsStatic, false); + Assert.AreEqual(methodInfo1.IsVirtual, false); + Assert.IsTrue(methodInfo1.MemberType == MemberTypes.Method); + Assert.AreEqual(methodInfo1.Name, "Method2"); Assert.IsType(methodInfo1.ReturnType, I.GetType()); Assert.IsType(methodInfo1.DeclaringType, myType2); - Assert.Equal((int)(methodInfo1.Invoke(testTestObject2, new object[] { 1 })), 1); + Assert.AreEqual((int)(methodInfo1.Invoke(testTestObject2, new object[] { 1 })), 1); } [TestMethod] @@ -489,16 +489,16 @@ public void SystemType11_GetMethods_Test() methodInfo1 = methodInfoArr1[1]; OutputHelper.WriteLine("Method2 found in position 1"); } - Assert.Equal(methodInfo1.IsAbstract, false); - Assert.Equal(methodInfo1.IsFinal, false); - Assert.Equal(methodInfo1.IsPublic, true); - Assert.Equal(methodInfo1.IsStatic, false); - Assert.Equal(methodInfo1.IsVirtual, false); - Assert.True(methodInfo1.MemberType == MemberTypes.Method); - Assert.Equal(methodInfo1.Name, "Method2"); + Assert.AreEqual(methodInfo1.IsAbstract, false); + Assert.AreEqual(methodInfo1.IsFinal, false); + Assert.AreEqual(methodInfo1.IsPublic, true); + Assert.AreEqual(methodInfo1.IsStatic, false); + Assert.AreEqual(methodInfo1.IsVirtual, false); + Assert.IsTrue(methodInfo1.MemberType == MemberTypes.Method); + Assert.AreEqual(methodInfo1.Name, "Method2"); Assert.IsType(methodInfo1.ReturnType, I.GetType()); Assert.IsType(methodInfo1.DeclaringType, myType2); - Assert.Equal((int)(methodInfo1.Invoke(testTestObject2, new object[] { 1 })), 1); + Assert.AreEqual((int)(methodInfo1.Invoke(testTestObject2, new object[] { 1 })), 1); } // Removing this one as not implemented scenario in nano @@ -514,7 +514,7 @@ public void SystemType11_GetMethods_Test() // TestObject2 testTestObject2 = new TestObject2(5); // Type myType2 = testTestObject2.GetType(); // OutputHelper.WriteLine("The full name is " + myType2.FullName); - // Assert.Equal((int)myType2.InvokeMember("Method2", BindingFlags.Default + // Assert.AreEqual((int)myType2.InvokeMember("Method2", BindingFlags.Default // | BindingFlags.InvokeMethod, null, testTestObject2, // new object[] { -6 }), -6); //} diff --git a/Tests/NFUnitTestSystemLib/UnitTestUInt16.cs b/Tests/NFUnitTestSystemLib/UnitTestUInt16.cs index c703b82c..8738df4f 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestUInt16.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestUInt16.cs @@ -15,26 +15,26 @@ public class UInt16Tests public void Ctor_Empty() { var i = new ushort(); - Assert.Equal((ushort)0, i); + Assert.AreEqual((ushort)0, i); } [TestMethod] public void Ctor_Value() { ushort i = 41; - Assert.Equal((ushort)41, i); + Assert.AreEqual((ushort)41, i); } [TestMethod] public void MaxValue() { - Assert.Equal((ushort)0xFFFF, ushort.MaxValue); + Assert.AreEqual((ushort)0xFFFF, ushort.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal((ushort)0, ushort.MinValue); + Assert.AreEqual((ushort)0, ushort.MinValue); } [TestMethod] @@ -54,12 +54,12 @@ public void Equals() { if (test.Obj is ushort) { - Assert.Equal(test.Expected, test.I1.Equals((ushort)test.Obj)); - Assert.Equal(test.Expected, test.I1.GetHashCode().Equals(((ushort)test.Obj).GetHashCode())); - Assert.Equal((ushort)test.I1, test.I1.GetHashCode()); + Assert.AreEqual(test.Expected, test.I1.Equals((ushort)test.Obj)); + Assert.AreEqual(test.Expected, test.I1.GetHashCode().Equals(((ushort)test.Obj).GetHashCode())); + Assert.AreEqual((ushort)test.I1, test.I1.GetHashCode()); } - Assert.Equal(test.Expected, test.I1.Equals(test.Obj)); + Assert.AreEqual(test.Expected, test.I1.Equals(test.Obj)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestUInt32.cs b/Tests/NFUnitTestSystemLib/UnitTestUInt32.cs index bf476c3a..3fb4389c 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestUInt32.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestUInt32.cs @@ -15,26 +15,26 @@ public class UInt32Tests public void Ctor_Empty() { var i = new uint(); - Assert.Equal((uint)0, i); + Assert.AreEqual((uint)0, i); } [TestMethod] public void Ctor_Value() { uint i = 41; - Assert.Equal((uint)41, i); + Assert.AreEqual((uint)41, i); } [TestMethod] public void MaxValue() { - Assert.Equal(0xFFFFFFFF, uint.MaxValue); + Assert.AreEqual(0xFFFFFFFF, uint.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal((uint)0, uint.MinValue); + Assert.AreEqual((uint)0, uint.MinValue); } [TestMethod] @@ -55,12 +55,12 @@ public void Equals() if (test.Obj is uint) { uint i2 = (uint)test.Obj; - Assert.Equal(test.Expected, test.I1.Equals(i2)); - Assert.Equal(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); - Assert.Equal((uint)test.I1, test.I1.GetHashCode()); + Assert.AreEqual(test.Expected, test.I1.Equals(i2)); + Assert.AreEqual(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); + Assert.AreEqual((uint)test.I1, test.I1.GetHashCode()); } - Assert.Equal(test.Expected, test.I1.Equals(test.Obj)); + Assert.AreEqual(test.Expected, test.I1.Equals(test.Obj)); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestUInt64.cs b/Tests/NFUnitTestSystemLib/UnitTestUInt64.cs index 6884c228..5d9c229e 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestUInt64.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestUInt64.cs @@ -15,26 +15,26 @@ public class UInt64Tests public void Ctor_Empty() { var i = new ulong(); - Assert.Equal((ulong)0, i); + Assert.AreEqual((ulong)0, i); } [TestMethod] public void Ctor_Value() { ulong i = 41; - Assert.Equal((ulong)41, i); + Assert.AreEqual((ulong)41, i); } [TestMethod] public void MaxValue() { - Assert.Equal(0xFFFFFFFFFFFFFFFF, ulong.MaxValue); + Assert.AreEqual(0xFFFFFFFFFFFFFFFF, ulong.MaxValue); } [TestMethod] public void MinValue() { - Assert.Equal((ulong)0, ulong.MinValue); + Assert.AreEqual((ulong)0, ulong.MinValue); } [TestMethod] @@ -56,12 +56,12 @@ public void Equals() if (test.Obj is ulong i2) { - Assert.Equal(test.Expected, test.I1.Equals(i2)); - Assert.Equal(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); - Assert.Equal((ulong)test.I1, test.I1.GetHashCode()); + Assert.AreEqual(test.Expected, test.I1.Equals(i2)); + Assert.AreEqual(test.Expected, test.I1.GetHashCode().Equals(i2.GetHashCode())); + Assert.AreEqual((ulong)test.I1, test.I1.GetHashCode()); } - Assert.Equal(test.Expected, test.I1.Equals(test.Obj), $"Equality test between {test.I1} and {test.Obj} failed"); + Assert.AreEqual(test.Expected, test.I1.Equals(test.Obj), $"Equality test between {test.I1} and {test.Obj} failed"); } } diff --git a/Tests/NFUnitTestSystemLib/UnitTestWeakReferenceTests.cs b/Tests/NFUnitTestSystemLib/UnitTestWeakReferenceTests.cs index e1468eaa..5816e3ab 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestWeakReferenceTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestWeakReferenceTests.cs @@ -64,12 +64,12 @@ void MakeSomeGarbage() // } // OutputHelper.WriteLine("GC took " + slept); - // Assert.False(hasFinalized1); + // Assert.IsFalse(hasFinalized1); // OutputHelper.WriteLine("Verify & Remove Strong reference"); - // Assert.Equal(((WeakRefClass)wr.Target).data, 5); + // Assert.AreEqual(((WeakRefClass)wr.Target).data, 5); // WRC1 = null; - // Assert.Null(WRC1); + // Assert.IsNull(WRC1); // OutputHelper.WriteLine("Allow for GC"); // // We should force the finalizer somehow @@ -83,12 +83,12 @@ void MakeSomeGarbage() // slept += 10; // } // OutputHelper.WriteLine("GC took " + slept); - // Assert.True(hasFinalized1); - // Assert.Null(WRC1 ); + // Assert.IsTrue(hasFinalized1); + // Assert.IsNull(WRC1 ); // if (wr.IsAlive) // { - // Assert.Equal(((WeakRefClass)wr.Target).data, 5); + // Assert.AreEqual(((WeakRefClass)wr.Target).data, 5); // OutputHelper.WriteLine("Weak Reference survived."); // } // else diff --git a/Tests/NFUnitTestThread/NFUnitTestThread.nfproj b/Tests/NFUnitTestThread/NFUnitTestThread.nfproj index 2afd8838..36016567 100644 --- a/Tests/NFUnitTestThread/NFUnitTestThread.nfproj +++ b/Tests/NFUnitTestThread/NFUnitTestThread.nfproj @@ -40,7 +40,7 @@ - + @@ -50,6 +50,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestThread/UnitTestMonitorTests.cs b/Tests/NFUnitTestThread/UnitTestMonitorTests.cs index 777dde4f..07975f80 100644 --- a/Tests/NFUnitTestThread/UnitTestMonitorTests.cs +++ b/Tests/NFUnitTestThread/UnitTestMonitorTests.cs @@ -127,7 +127,7 @@ public void Monitor2_SynchronizationLockException_Test() /// OutputHelper.WriteLine("Verify SynchronizationLockException exception is thrown"); OutputHelper.WriteLine("Calling Monitor.Exit without first calling Monitor.Enter should throw an exception"); - Assert.Throws(typeof(Exception), () => { Monitor.Exit(locker1); }); + Assert.ThrowsException(typeof(Exception), () => { Monitor.Exit(locker1); }); } [TestMethod] @@ -141,7 +141,7 @@ public void Monitor3_Enter_ArgumentNullException_Test() OutputHelper.WriteLine("verify ArgumentNullException exception is thrown "); OutputHelper.WriteLine("Calling Monitor.Enter passing null reference parameter should throw exception"); - Assert.Throws(typeof(ArgumentNullException), () => { Monitor.Enter(null); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { Monitor.Enter(null); }); } @@ -155,7 +155,7 @@ public void Monitor4_Exit_ArgumentNullException_Test() /// OutputHelper.WriteLine("verify ArgumentNullException exception is thrown "); OutputHelper.WriteLine("Calling Monitor.Exit passing 'null' reference parameter should throw exception"); - Assert.Throws(typeof(ArgumentNullException), () => { Monitor.Exit(null); }); + Assert.ThrowsException(typeof(ArgumentNullException), () => { Monitor.Exit(null); }); } static ManualResetEvent flag = new ManualResetEvent(false); diff --git a/Tests/NFUnitTestThread/UnitTestThreadTest.cs b/Tests/NFUnitTestThread/UnitTestThreadTest.cs index 36b4fcb4..03f979fe 100644 --- a/Tests/NFUnitTestThread/UnitTestThreadTest.cs +++ b/Tests/NFUnitTestThread/UnitTestThreadTest.cs @@ -915,7 +915,7 @@ public void Threading_Join_ArgumentOutOfRangeException_Test17() Thread newThread1 = new Thread(Work.DoWork); newThread1.Start(); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { newThread1.Join(-77); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { newThread1.Join(-77); }); } [TestMethod] @@ -929,7 +929,7 @@ public void Threading_Sleep_ArgumentOutOfRangeException_Test18() OutputHelper.WriteLine("Verify ArgumentOutOfRangeException exception is thrown"); OutputHelper.WriteLine("Why not for -1 ?"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { Thread.Sleep(-2); }); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { Thread.Sleep(-2); }); } [TestMethod] @@ -943,7 +943,7 @@ public void Threading_Join_ThreadStateException_Test19() OutputHelper.WriteLine("The type of exception thrown should be ThreadStateException"); Thread newThread1 = new Thread(Work.DoWork); - Assert.Throws(typeof(Exception), () => { newThread1.Join(); }); + Assert.ThrowsException(typeof(Exception), () => { newThread1.Join(); }); } [TestMethod] @@ -957,7 +957,7 @@ public void Threading_Suspend_ThreadStateException_Test20() OutputHelper.WriteLine("The type of exception thrown should be ThreadStateException"); Thread newThread1 = new Thread(Work.DoWork); - Assert.Throws(typeof(Exception), () => { newThread1.Suspend(); }); + Assert.ThrowsException(typeof(Exception), () => { newThread1.Suspend(); }); } [TestMethod] @@ -972,7 +972,7 @@ public void Threading_Resume_ThreadStateException_Test21() OutputHelper.WriteLine("The type of exception thrown should be ThreadStateException"); Thread newThread1 = new Thread(Work.DoWork); - Assert.Throws(typeof(Exception), () => { newThread1.Resume(); }); + Assert.ThrowsException(typeof(Exception), () => { newThread1.Resume(); }); } static bool sleepZero = false; diff --git a/Tests/NFUnitTestThread/UnitTestTimeTests.cs b/Tests/NFUnitTestThread/UnitTestTimeTests.cs index 0083c482..6e2c4c0a 100644 --- a/Tests/NFUnitTestThread/UnitTestTimeTests.cs +++ b/Tests/NFUnitTestThread/UnitTestTimeTests.cs @@ -366,7 +366,7 @@ public void Timer_Negative_Period_Test6() statusChecker.m_result = false; OutputHelper.WriteLine("Changing period to -ve"); OutputHelper.WriteLine("period is negative and is not equal to Infinite (or -1) should throw an exception"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { stateTimer.Change(0, -2); OutputHelper.WriteLine("Waiting and verifying"); @@ -407,7 +407,7 @@ public void Timer_Negative_Duetime_Test7() statusChecker.m_result = false; OutputHelper.WriteLine("Changing period -ve"); OutputHelper.WriteLine("duetime is negative and is not equal to Infinite(or -1) should throw an exception"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { stateTimer.Change(-2, 500); OutputHelper.WriteLine("Waiting and verifying"); @@ -433,7 +433,7 @@ public void Timer_TimerCallback_Null_Test8() OutputHelper.WriteLine("Creating timer: " + DateTime.UtcNow.ToString()); - Assert.Throws(typeof(ArgumentNullException), () => + Assert.ThrowsException(typeof(ArgumentNullException), () => { OutputHelper.WriteLine("Passing a 'null' callback parameter to a timer should throw exception"); Timer stateTimer = new Timer(null, autoEvent, 1000, 250); diff --git a/Tests/NFUnitTestTypes/NFUnitTestTypes.nfproj b/Tests/NFUnitTestTypes/NFUnitTestTypes.nfproj index 0c92865b..cced57f9 100644 --- a/Tests/NFUnitTestTypes/NFUnitTestTypes.nfproj +++ b/Tests/NFUnitTestTypes/NFUnitTestTypes.nfproj @@ -42,7 +42,7 @@ - + @@ -52,6 +52,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestTypes/UnitTestObjectTypeTests.cs b/Tests/NFUnitTestTypes/UnitTestObjectTypeTests.cs index e29d2135..dda3a61d 100644 --- a/Tests/NFUnitTestTypes/UnitTestObjectTypeTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestObjectTypeTests.cs @@ -17,7 +17,7 @@ public void TestCtor() OutputHelper.WriteLine("Test of Object constructor"); object o = new(); - Assert.NotNull(o, "failed to create an Object"); + Assert.IsNotNull(o, "failed to create an Object"); } [TestMethod] @@ -28,14 +28,14 @@ public void TestEquals_01() object objectX = new(); object objectY = new(); - Assert.True(objectX.Equals(objectX), "Object should equal itself"); - Assert.True(!objectX.Equals(null), "object should not equal null"); - Assert.True(!objectX.Equals(objectY), "Different objects should not equal 1"); - Assert.True(!objectY.Equals(objectX), "Different objects should not equal 2"); + Assert.IsTrue(objectX.Equals(objectX), "Object should equal itself"); + Assert.IsTrue(!objectX.Equals(null), "object should not equal null"); + Assert.IsTrue(!objectX.Equals(objectY), "Different objects should not equal 1"); + Assert.IsTrue(!objectY.Equals(objectX), "Different objects should not equal 2"); double doubleX = double.NaN; double doubleY = double.NaN; - Assert.True(((object)doubleX).Equals(doubleY), "NaNs should always equal each other"); + Assert.IsTrue(((object)doubleX).Equals(doubleY), "NaNs should always equal each other"); } [TestMethod] @@ -46,17 +46,17 @@ public void TestEquals_02() object objectX = new(); object objectY = new(); - Assert.True(Equals(objectX, objectX), "Object should equal itself"); - Assert.True(!Equals(objectX, null), "object should not equal null"); - Assert.True(!Equals(null, objectX), "null should not equal object"); - Assert.True(!Equals(objectX, objectY), "Different objects should not equal 1"); - Assert.True(!Equals(objectY, objectX), "Different objects should not equal 2"); - Assert.True(Equals(null, null), "null should equal null"); + Assert.IsTrue(Equals(objectX, objectX), "Object should equal itself"); + Assert.IsTrue(!Equals(objectX, null), "object should not equal null"); + Assert.IsTrue(!Equals(null, objectX), "null should not equal object"); + Assert.IsTrue(!Equals(objectX, objectY), "Different objects should not equal 1"); + Assert.IsTrue(!Equals(objectY, objectX), "Different objects should not equal 2"); + Assert.IsTrue(Equals(null, null), "null should equal null"); double doubleX = double.NaN; double doubleY = double.NaN; - Assert.True(Equals(doubleX, doubleY), "NaNs should always equal each other"); + Assert.IsTrue(Equals(doubleX, doubleY), "NaNs should always equal each other"); } [TestMethod] @@ -65,7 +65,7 @@ public void TestGetHashCode() OutputHelper.WriteLine("Test Object HashCode"); object objectX = new(); - Assert.Equal(objectX.GetHashCode(), objectX.GetHashCode(), "Object's hash code should not change"); + Assert.AreEqual(objectX.GetHashCode(), objectX.GetHashCode(), "Object's hash code should not change"); } [TestMethod] @@ -75,8 +75,8 @@ public void TestGetType() object objectX = new(); - Assert.NotNull(objectX.GetType(), "Should get a type for Object"); - Assert.Equal(objectX.GetType().ToString(), "System.Object", "Wrong ToString from Object type"); + Assert.IsNotNull(objectX.GetType(), "Should get a type for Object"); + Assert.AreEqual(objectX.GetType().ToString(), "System.Object", "Wrong ToString from Object type"); } [TestMethod] @@ -87,12 +87,12 @@ public void TestReferenceEquals() object objectX = new(); object objectY = new(); - Assert.True(ReferenceEquals(objectX, objectX), "Object should equal itself"); - Assert.True(!ReferenceEquals(objectX, null), "object should not equal null"); - Assert.True(!ReferenceEquals(null, objectX), "null should not equal object"); - Assert.True(!ReferenceEquals(objectX, objectY), "Different objects should not equal 1"); - Assert.True(!ReferenceEquals(objectY, objectX), "Different objects should not equal 2"); - Assert.True(ReferenceEquals(null, null), "null should not equal null"); + Assert.IsTrue(ReferenceEquals(objectX, objectX), "Object should equal itself"); + Assert.IsTrue(!ReferenceEquals(objectX, null), "object should not equal null"); + Assert.IsTrue(!ReferenceEquals(null, objectX), "null should not equal object"); + Assert.IsTrue(!ReferenceEquals(objectX, objectY), "Different objects should not equal 1"); + Assert.IsTrue(!ReferenceEquals(objectY, objectX), "Different objects should not equal 2"); + Assert.IsTrue(ReferenceEquals(null, null), "null should not equal null"); } [TestMethod] @@ -103,7 +103,7 @@ public void TestToString() object objectX = new(); object objectY = new(); - Assert.Equal(objectX.ToString(), objectY.ToString(), "All Objects should have same string representation"); + Assert.AreEqual(objectX.ToString(), objectY.ToString(), "All Objects should have same string representation"); } } } diff --git a/Tests/NFUnitTestTypes/UnitTestSubTypeTests.cs b/Tests/NFUnitTestTypes/UnitTestSubTypeTests.cs index 2afa5a08..cbe069e4 100644 --- a/Tests/NFUnitTestTypes/UnitTestSubTypeTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestSubTypeTests.cs @@ -34,11 +34,11 @@ public void SubClassGetTypeValid() const string subClass1FullName = "NFUnitTestTypes.UnitTestSubTypeTests+Class1+SubClass1"; Class1 c1 = new Class1(); string className = c1.Sc1ClassRef.GetType().FullName; - Assert.Equal(className, subClass1FullName, "The object FullName was not correct"); + Assert.AreEqual(className, subClass1FullName, "The object FullName was not correct"); Type testType = Type.GetType(subClass1FullName); - Assert.NotNull(testType, $"The Type for {subClass1FullName} could not be parsed"); - Assert.Equal(testType.Name, "SubClass1"); - Assert.Equal(testType.FullName, subClass1FullName); + Assert.IsNotNull(testType, $"The Type for {subClass1FullName} could not be parsed"); + Assert.AreEqual(testType.Name, "SubClass1"); + Assert.AreEqual(testType.FullName, subClass1FullName); } [TestMethod] @@ -47,7 +47,7 @@ public void SubClassGetTypeInvalid() { Class1 c1 = new Class1(); Type testType = Type.GetType("UnitTestSubTypeTests+Class1+SubClass1"); // test without the namespace. This should NOT work - Assert.Null(testType, "The Type for UnitTestSubTypeTests+Class1+SubClass1 should not parse"); + Assert.IsNull(testType, "The Type for UnitTestSubTypeTests+Class1+SubClass1 should not parse"); } diff --git a/Tests/NFUnitTestTypes/UnitTestValueDefultConstTests.cs b/Tests/NFUnitTestTypes/UnitTestValueDefultConstTests.cs index fada209f..5d627f31 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueDefultConstTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueDefultConstTests.cs @@ -117,7 +117,7 @@ public class ValueDefault_ConstTestClass01 public static void testMethod() { byte b = new byte(); - Assert.Equal(b, (byte)0); + Assert.AreEqual(b, (byte)0); } } @@ -126,7 +126,7 @@ public class ValueDefault_ConstTestClass02 public static void testMethod() { short s = new short(); - Assert.Equal(s, (short)0); + Assert.AreEqual(s, (short)0); } } @@ -135,7 +135,7 @@ public class ValueDefault_ConstTestClass03 public static void testMethod() { int i = new int(); - Assert.Equal(i, 0); + Assert.AreEqual(i, 0); } } @@ -144,7 +144,7 @@ public class ValueDefault_ConstTestClass04 public static void testMethod() { long l = new long(); - Assert.Equal(l, 0L); + Assert.AreEqual(l, 0L); } } @@ -153,7 +153,7 @@ public class ValueDefault_ConstTestClass05 public static void testMethod() { char c = new char(); - Assert.Equal(c, '\x0000'); + Assert.AreEqual(c, '\x0000'); } } @@ -162,7 +162,7 @@ public class ValueDefault_ConstTestClass06 public static void testMethod() { float f = new float(); - Assert.Equal(f, 0.0f); + Assert.AreEqual(f, 0.0f); } } @@ -171,7 +171,7 @@ public class ValueDefault_ConstTestClass07 public static void testMethod() { double d = new double(); - Assert.Equal(d, 0.0d); + Assert.AreEqual(d, 0.0d); } } @@ -180,7 +180,7 @@ public class ValueDefault_ConstTestClass09 public static void testMethod() { bool b = new bool(); - Assert.Equal(b, false); + Assert.AreEqual(b, false); } } @@ -224,7 +224,7 @@ public class ValueDefault_ConstTestClass14 public static void testMethod() { sbyte b = new sbyte(); - Assert.Equal(b, (sbyte)0); + Assert.AreEqual(b, (sbyte)0); } } @@ -233,7 +233,7 @@ public class ValueDefault_ConstTestClass15 public static void testMethod() { ushort b = new ushort(); - Assert.Equal(b, (ushort)0); + Assert.AreEqual(b, (ushort)0); } } @@ -242,7 +242,7 @@ public class ValueDefault_ConstTestClass16 public static void testMethod() { uint b = new uint(); - Assert.Equal(b , (uint)0) ; + Assert.AreEqual(b , (uint)0) ; } } @@ -251,7 +251,7 @@ public class ValueDefault_ConstTestClass17 public static void testMethod() { ulong b = new ulong(); - Assert.Equal(b, (ulong)0); + Assert.AreEqual(b, (ulong)0); } } diff --git a/Tests/NFUnitTestTypes/UnitTestValueFloatTests.cs b/Tests/NFUnitTestTypes/UnitTestValueFloatTests.cs index e4b98746..6334a048 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueFloatTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueFloatTests.cs @@ -809,10 +809,10 @@ public static void testMethod() { float f1 = float.Epsilon; double d1 = double.Epsilon; - Assert.Equal((float)(f1 / 2.0f), 0.0f); - Assert.Equal((float)(f1 * 0.5f), 0.0f); - Assert.Equal((double)(d1 / 2.0d), (double)0.0d); - Assert.Equal((double)(d1 * 0.5d), (double)0.0d); + Assert.AreEqual((float)(f1 / 2.0f), 0.0f); + Assert.AreEqual((float)(f1 * 0.5f), 0.0f); + Assert.AreEqual((double)(d1 / 2.0d), (double)0.0d); + Assert.AreEqual((double)(d1 * 0.5d), (double)0.0d); } } diff --git a/Tests/NFUnitTestTypes/UnitTestValueIntegralTests.cs b/Tests/NFUnitTestTypes/UnitTestValueIntegralTests.cs index 54a521cb..193b7cff 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueIntegralTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueIntegralTests.cs @@ -458,14 +458,14 @@ public static void testMethod() char c1 = (char)6; int c2 = -c1; - Assert.Equal(s2, (short)-2); - Assert.Equal(b2, -3); - Assert.Equal(i2, -4); - Assert.Equal(l2, -5L); - Assert.Equal(c2, -6); - Assert.Equal(i2, -4); - Assert.Equal(l2, -5L); - Assert.Equal(c2, -6); + Assert.AreEqual(s2, (short)-2); + Assert.AreEqual(b2, -3); + Assert.AreEqual(i2, -4); + Assert.AreEqual(l2, -5L); + Assert.AreEqual(c2, -6); + Assert.AreEqual(i2, -4); + Assert.AreEqual(l2, -5L); + Assert.AreEqual(c2, -6); } } public class ValueIntegralTestClass05 @@ -483,11 +483,11 @@ public static void testMethod() char c1 = (char)6; int c2 = +c1; - Assert.Equal(s2, (short)2); - Assert.Equal(b2, 3); - Assert.Equal(i2, 4); - Assert.Equal(l2, 5L); - Assert.Equal(c2, 6); + Assert.AreEqual(s2, (short)2); + Assert.AreEqual(b2, 3); + Assert.AreEqual(i2, 4); + Assert.AreEqual(l2, 5L); + Assert.AreEqual(c2, 6); } } public class ValueIntegralTestClass09 @@ -505,11 +505,11 @@ public static void testMethod() char c1 = (char)6; int c2 = ~c1; - Assert.Equal(s2, (short)-3); - Assert.Equal(b2, -4); - Assert.Equal(i2, -5); - Assert.Equal(l2, -6L); - Assert.Equal(c2, -7); + Assert.AreEqual(s2, (short)-3); + Assert.AreEqual(b2, -4); + Assert.AreEqual(i2, -5); + Assert.AreEqual(l2, -6L); + Assert.AreEqual(c2, -7); } } public class ValueIntegralTestClass13 @@ -944,7 +944,7 @@ public class ValueIntegralTestClass38 public static void testMethod() { char c = '\x000A'; - Assert.Equal(c, (char)10); + Assert.AreEqual(c, (char)10); } } public class ValueIntegralTestClass39 @@ -960,10 +960,10 @@ public static void testMethod() ulong l1 = 5ul; ulong l2 = +l1; - Assert.Equal(s2, (ushort)2); - Assert.Equal(b2, 3); - Assert.Equal(i2, 4); - Assert.Equal(l2, 5ul); + Assert.AreEqual(s2, (ushort)2); + Assert.AreEqual(b2, 3); + Assert.AreEqual(i2, 4); + Assert.AreEqual(l2, 5ul); } } public class ValueIntegralTestClass42 @@ -981,10 +981,10 @@ public static void testMethod() ulong l1 = 5ul; ulong l2 = ~l1; - Assert.Equal(s2, -3); - Assert.Equal(b2, -4); - Assert.Equal(i2, 4294967291u); - Assert.Equal(l2, 18446744073709551610ul); + Assert.AreEqual(s2, -3); + Assert.AreEqual(b2, -4); + Assert.AreEqual(i2, 4294967291u); + Assert.AreEqual(l2, 18446744073709551610ul); } } } @@ -999,9 +999,9 @@ public static void testMethod() uint i1 = 4; long i2 = -i1; - Assert.Equal(s2, -2); - Assert.Equal(b2, -3); - Assert.Equal(i2, -4); + Assert.AreEqual(s2, -2); + Assert.AreEqual(b2, -3); + Assert.AreEqual(i2, -4); } } public class ValueIntegralTestClass49 @@ -1704,7 +1704,7 @@ public class ValueIntegralTestClass70 public static void testMethod() { char c = (char)10; - Assert.Equal(c, '\x000a'); + Assert.AreEqual(c, '\x000a'); } } diff --git a/Tests/NFUnitTestTypes/UnitTestValueSimpleTests.cs b/Tests/NFUnitTestTypes/UnitTestValueSimpleTests.cs index 0908c728..f191a4c4 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueSimpleTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueSimpleTests.cs @@ -180,8 +180,8 @@ public static void testMethod() { System.Byte b = 2; System.Int32 i = 2; - Assert.Equal(b, (System.Byte)2); - Assert.Equal(i, 2); + Assert.AreEqual(b, (System.Byte)2); + Assert.AreEqual(i, 2); } } public class ValueSimpleTestClass12 @@ -189,12 +189,12 @@ public class ValueSimpleTestClass12 public static void testMethod() { int i = int.MaxValue; - Assert.Equal(i, Int32.MaxValue); + Assert.AreEqual(i, Int32.MaxValue); string s = i.ToString(); - Assert.True(s.Equals(Int32.MaxValue.ToString())); + Assert.IsTrue(s.Equals(Int32.MaxValue.ToString())); i = 123; string t = 123.ToString(); - Assert.True(t.Equals(i.ToString())); + Assert.IsTrue(t.Equals(i.ToString())); } } public class ValueSimpleTestClass13 diff --git a/Tests/NFUnitTestTypes/UnitTestValueTests.cs b/Tests/NFUnitTestTypes/UnitTestValueTests.cs index fd808bb6..d81910ca 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueTests.cs @@ -47,7 +47,7 @@ public static void testMethod() MS2 = MS; MS.MyInt = 4; - Assert.Equal(MS2.MyInt, 3); + Assert.AreEqual(MS2.MyInt, 3); } } @@ -61,7 +61,7 @@ public static void testMethod() MyInt = 3; MyInt2 = MyInt; MyInt = 4; - Assert.Equal(MyInt2, 3); + Assert.AreEqual(MyInt2, 3); } } @@ -76,7 +76,7 @@ public static void testMethod() Enum1 = ValueTestClass9_Enum.a; Enum2 = Enum1; Enum1 = ValueTestClass9_Enum.b; - Assert.Equal((int)Enum2, (int)ValueTestClass9_Enum.a); + Assert.AreEqual((int)Enum2, (int)ValueTestClass9_Enum.a); } } diff --git a/Tests/NFUnitTestTypes/UnitTestsSpanByte.cs b/Tests/NFUnitTestTypes/UnitTestsSpanByte.cs index 55e55cb0..e196eadd 100644 --- a/Tests/NFUnitTestTypes/UnitTestsSpanByte.cs +++ b/Tests/NFUnitTestTypes/UnitTestsSpanByte.cs @@ -29,26 +29,26 @@ public void EmptySpanTests() public void RaisingExceptionsOfAllKindsTests() { // Should raise an exception on creation - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(null, 1, 2); }, "ArgumentOutOfRangeException when array is null, start is 1 and length is 2"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(new byte[1], 1, 2); }, "ArgumentOutOfRangeException when array is new byte[1], start is 1 and length is 2"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(new byte[1], 0, 2); }, "ArgumentOutOfRangeException when array is new byte[1], start is 0 and length is 2"); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(new byte[1], 2, 0); }, "ArgumentOutOfRangeException when array is new byte[1], start is 2 and length is 0"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(null, 1, 2); }, "ArgumentOutOfRangeException when array is null, start is 1 and length is 2"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(new byte[1], 1, 2); }, "ArgumentOutOfRangeException when array is new byte[1], start is 1 and length is 2"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(new byte[1], 0, 2); }, "ArgumentOutOfRangeException when array is new byte[1], start is 0 and length is 2"); + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(new byte[1], 2, 0); }, "ArgumentOutOfRangeException when array is new byte[1], start is 2 and length is 0"); // Exception on index access byte[] array = new byte[16] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }; - Assert.Throws(typeof(ArgumentOutOfRangeException), () => + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(array); var data = span[span.Length]; }); - Assert.Throws(typeof(IndexOutOfRangeException), () => + Assert.ThrowsException(typeof(IndexOutOfRangeException), () => { SpanByte span = new SpanByte(array); var data = span[-1]; }); // Copy to with too small destination - Assert.Throws(typeof(ArgumentException), () => + Assert.ThrowsException(typeof(ArgumentException), () => { SpanByte span = new SpanByte(array); SpanByte destination = new byte[span.Length - 1]; @@ -56,24 +56,24 @@ public void RaisingExceptionsOfAllKindsTests() }); // Slicing arguments - Assert.Throws(typeof(ArgumentOutOfRangeException), () => + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(array); var sliced = span.Slice(span.Length + 1); }); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(array); var sliced = span.Slice(1, span.Length); }); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(array); var sliced = span.Slice(-1, span.Length); }); - Assert.Throws(typeof(ArgumentOutOfRangeException), () => + Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { SpanByte span = new SpanByte(array); var sliced = span.Slice(1, -1); @@ -98,29 +98,29 @@ public void ConstructorsOfAllKindsTests() { // Empty span SpanByte span = new SpanByte(); - Assert.Equal(span.Length, 0, "Empty SpanByte should have length of 0"); - Assert.True(span.IsEmpty, "Empty SpanByte should be IsEmpty"); + Assert.AreEqual(span.Length, 0, "Empty SpanByte should have length of 0"); + Assert.IsTrue(span.IsEmpty, "Empty SpanByte should be IsEmpty"); // Empty span span = new SpanByte(null, 0, 0); - Assert.Equal(span.Length, 0, "Empty SpanByte should have length of 0"); - Assert.True(span.IsEmpty, "Empty SpanByte should be IsEmpty"); + Assert.AreEqual(span.Length, 0, "Empty SpanByte should have length of 0"); + Assert.IsTrue(span.IsEmpty, "Empty SpanByte should be IsEmpty"); // Empty span span = SpanByte.Empty; - Assert.Equal(span.Length, 0, "Empty SpanByte should have length of 0"); - Assert.True(span.IsEmpty, "Empty SpanByte should be IsEmpty"); + Assert.AreEqual(span.Length, 0, "Empty SpanByte should have length of 0"); + Assert.IsTrue(span.IsEmpty, "Empty SpanByte should be IsEmpty"); // Span from normal array byte[] array = new byte[16] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }; span = new SpanByte(array); - Assert.Equal(span.Length, array.Length, $"SpanByte should have length of the array it takes: {array.Length}"); - Assert.False(span.IsEmpty, "SpanByte should NOT be IsEmpty"); + Assert.AreEqual(span.Length, array.Length, $"SpanByte should have length of the array it takes: {array.Length}"); + Assert.IsFalse(span.IsEmpty, "SpanByte should NOT be IsEmpty"); // Span from normal array with different start and length span = new SpanByte(array, 2, 8); - Assert.Equal(span.Length, 8, $"SpanByte should have length of 8"); - Assert.False(span.IsEmpty, "SpanByte should NOT be IsEmpty"); + Assert.AreEqual(span.Length, 8, $"SpanByte should have length of 8"); + Assert.IsFalse(span.IsEmpty, "SpanByte should NOT be IsEmpty"); } [TestMethod] @@ -131,38 +131,38 @@ public void SliceTests() SpanByte span = new SpanByte(array); // Slice 2 elements and check var sliced = span.Slice(0, 2); - Assert.Equal(sliced.Length, 2, "Sliced span lenght must be 2"); - Assert.Equal(sliced[0], (byte)0x00, "Sliced first element must be value 0"); - Assert.Equal(sliced[1], (byte)0x01, "Sliced first element must be value 1"); + Assert.AreEqual(sliced.Length, 2, "Sliced span lenght must be 2"); + Assert.AreEqual(sliced[0], (byte)0x00, "Sliced first element must be value 0"); + Assert.AreEqual(sliced[1], (byte)0x01, "Sliced first element must be value 1"); // Slide 4 elements starting at index 2 and check sliced = span.Slice(2, 4); - Assert.Equal(sliced.Length, 4, "Sliced span lenght must be 4"); - Assert.Equal(sliced[0], (byte)0x02, "Sliced first element must be value 2"); - Assert.Equal(sliced[1], (byte)0x03, "Sliced first element must be value 3"); - Assert.Equal(sliced[2], (byte)0x04, "Sliced first element must be value 4"); - Assert.Equal(sliced[3], (byte)0x05, "Sliced first element must be value 5"); + Assert.AreEqual(sliced.Length, 4, "Sliced span lenght must be 4"); + Assert.AreEqual(sliced[0], (byte)0x02, "Sliced first element must be value 2"); + Assert.AreEqual(sliced[1], (byte)0x03, "Sliced first element must be value 3"); + Assert.AreEqual(sliced[2], (byte)0x04, "Sliced first element must be value 4"); + Assert.AreEqual(sliced[3], (byte)0x05, "Sliced first element must be value 5"); // Slide starting 4 at element check sliced = span.Slice(4); - Assert.Equal(sliced.Length, 12, "Sliced span lenght must be 12"); + Assert.AreEqual(sliced.Length, 12, "Sliced span lenght must be 12"); for (int i = 0; i < sliced.Length; i++) { - Assert.Equal(sliced[i], span[i + 4], "SpanByte value should be the same as from the original span"); + Assert.AreEqual(sliced[i], span[i + 4], "SpanByte value should be the same as from the original span"); } // Slice of slice var secondSliced = sliced.Slice(2, 4); - Assert.Equal(secondSliced.Length, 4, "Sliced span lenght must be 12"); + Assert.AreEqual(secondSliced.Length, 4, "Sliced span lenght must be 12"); for (int i = 0; i < secondSliced.Length; i++) { - Assert.Equal(secondSliced[i], sliced[i + 2], "SpanByte value should be the same as from the original span"); + Assert.AreEqual(secondSliced[i], sliced[i + 2], "SpanByte value should be the same as from the original span"); } // Should be an empty one var empty = span.Slice(span.Length); - Assert.Equal(empty.Length, 0, "slicing all the span should result in an empty span"); - Assert.True(empty.IsEmpty, "Empty span should be empty"); + Assert.AreEqual(empty.Length, 0, "slicing all the span should result in an empty span"); + Assert.IsTrue(empty.IsEmpty, "Empty span should be empty"); } [TestMethod] @@ -175,7 +175,7 @@ public void CopyToTests() span.CopyTo(toCopy); for (int i = 0; i < span.Length; i++) { - Assert.Equal(toCopy[i], span[i], "SpanByte value should be the same as from the original array"); + Assert.AreEqual(toCopy[i], span[i], "SpanByte value should be the same as from the original array"); } // Now create a larger span @@ -183,10 +183,10 @@ public void CopyToTests() span.CopyTo(toCopy); for (int i = 0; i < span.Length; i++) { - Assert.Equal(toCopy[i], span[i], "SpanByte value should be the same as from the original array"); + Assert.AreEqual(toCopy[i], span[i], "SpanByte value should be the same as from the original array"); } - Assert.Equal(toCopy[span.Length], (byte)0); + Assert.AreEqual(toCopy[span.Length], (byte)0); } [TestMethod] @@ -197,14 +197,14 @@ public void GetElementsTests() SpanByte span = new SpanByte(array); for (int i = 0; i < span.Length; i++) { - Assert.Equal(span[i], array[i], "SpanByte value should be the same as from the original array"); + Assert.AreEqual(span[i], array[i], "SpanByte value should be the same as from the original array"); } // Partial span span = new SpanByte(array, 2, 8); for (int i = 0; i < span.Length; i++) { - Assert.Equal(span[i], array[i + 2], "SpanByte value should be the same as from the original array"); + Assert.AreEqual(span[i], array[i + 2], "SpanByte value should be the same as from the original array"); } } @@ -216,7 +216,7 @@ public void SetElementsTests() // All should be 0 for (int i = 0; i < span.Length; i++) { - Assert.Equal(span[i], (byte)0, "SpanByte value should be 0"); + Assert.AreEqual(span[i], (byte)0, "SpanByte value should be 0"); // Set a value span[i] = (byte)i; } @@ -224,7 +224,7 @@ public void SetElementsTests() for (int i = 0; i < span.Length; i++) { // Check the value - Assert.Equal(span[i], (byte)i, "SpanByte value should be the same as setup in the set method"); + Assert.AreEqual(span[i], (byte)i, "SpanByte value should be the same as setup in the set method"); } } } diff --git a/Tests/NFUnitTestVariables/CategoryTests.cs b/Tests/NFUnitTestVariables/CategoryTests.cs index 4624be91..c1082348 100644 --- a/Tests/NFUnitTestVariables/CategoryTests.cs +++ b/Tests/NFUnitTestVariables/CategoryTests.cs @@ -588,8 +588,8 @@ public class Categories_TestClass_static01 public static byte b1 = 2; public static void Main_old() { - Assert.Equal(Categories_TestClass_static01_1.b1, (byte)1); - Assert.Equal(Categories_TestClass_static01.b1, (byte)2); + Assert.AreEqual(Categories_TestClass_static01_1.b1, (byte)1); + Assert.AreEqual(Categories_TestClass_static01.b1, (byte)2); } public static void testMethod() { @@ -605,8 +605,8 @@ public class Categories_TestClass_static02 public static char c1 = 'b'; public static void Main_old() { - Assert.Equal(Categories_TestClass_static02_1.c1, 'a'); - Assert.Equal(Categories_TestClass_static02.c1, 'b'); + Assert.AreEqual(Categories_TestClass_static02_1.c1, 'a'); + Assert.AreEqual(Categories_TestClass_static02.c1, 'b'); } public static void testMethod() { @@ -622,8 +622,8 @@ public class Categories_TestClass_static03 public static short s1 = 2; public static void Main_old() { - Assert.Equal(Categories_TestClass_static03_1.s1, (short)1); - Assert.Equal(Categories_TestClass_static03.s1, (short)2); + Assert.AreEqual(Categories_TestClass_static03_1.s1, (short)1); + Assert.AreEqual(Categories_TestClass_static03.s1, (short)2); } public static void testMethod() { @@ -639,8 +639,8 @@ public class Categories_TestClass_static04 public static int i1 = 2; public static void Main_old() { - Assert.Equal(Categories_TestClass_static04_1.i1, 1); - Assert.Equal(Categories_TestClass_static04.i1, 2); + Assert.AreEqual(Categories_TestClass_static04_1.i1, 1); + Assert.AreEqual(Categories_TestClass_static04.i1, 2); } public static void testMethod() { @@ -656,8 +656,8 @@ public class Categories_TestClass_static05 public static long l1 = 2L; public static void Main_old() { - Assert.Equal(Categories_TestClass_static05_1.l1, 1L); - Assert.Equal(Categories_TestClass_static05.l1, 2L); + Assert.AreEqual(Categories_TestClass_static05_1.l1, 1L); + Assert.AreEqual(Categories_TestClass_static05.l1, 2L); } public static void testMethod() { @@ -674,8 +674,8 @@ public class Categories_TestClass_static06 public static float f1 = 2f; public static void Main_old() { - Assert.Equal(Categories_TestClass_static06_1.f1, 1f); - Assert.Equal(Categories_TestClass_static06.f1, 2f); + Assert.AreEqual(Categories_TestClass_static06_1.f1, 1f); + Assert.AreEqual(Categories_TestClass_static06.f1, 2f); } public static void testMethod() { @@ -691,8 +691,8 @@ public class Categories_TestClass_static07 public static double d1 = 2d; public static void Main_old() { - Assert.Equal(Categories_TestClass_static07_1.d1, 1d); - Assert.Equal(Categories_TestClass_static07.d1, 2d); + Assert.AreEqual(Categories_TestClass_static07_1.d1, 1d); + Assert.AreEqual(Categories_TestClass_static07.d1, 2d); } public static void testMethod() { @@ -708,8 +708,8 @@ public class Categories_TestClass_static09 public static bool b1 = false; public static void Main_old() { - Assert.Equal(Categories_TestClass_static09_1.b1, true); - Assert.Equal(Categories_TestClass_static09.b1, false); + Assert.AreEqual(Categories_TestClass_static09_1.b1, true); + Assert.AreEqual(Categories_TestClass_static09.b1, false); } public static void testMethod() { @@ -725,8 +725,8 @@ public class Categories_TestClass_static11 public static string s1 = "string2"; public static void Main_old() { - Assert.True(Categories_TestClass_static11_1.s1.Equals("string1")); - Assert.True(Categories_TestClass_static11.s1.Equals("string2")); + Assert.IsTrue(Categories_TestClass_static11_1.s1.Equals("string1")); + Assert.IsTrue(Categories_TestClass_static11.s1.Equals("string2")); } public static void testMethod() { @@ -751,8 +751,8 @@ public class Categories_TestClass_static12 public static Categories_TestClass_static12_Str s1 = new Categories_TestClass_static12_Str(2); public static void Main_old() { - Assert.Equal(Categories_TestClass_static12_1.s1.intI, 1); - Assert.Equal(Categories_TestClass_static12.s1.intI, 2); + Assert.AreEqual(Categories_TestClass_static12_1.s1.intI, 1); + Assert.AreEqual(Categories_TestClass_static12.s1.intI, 2); } public static void testMethod() { @@ -800,8 +800,8 @@ public class Categories_TestClass_static14 public static Categories_TestClass_static14_C c1 = new Categories_TestClass_static14_C(2); public static void Main_old() { - Assert.Equal(Categories_TestClass_static14_1.c1.intI, 1); - Assert.Equal(Categories_TestClass_static14.c1.intI, 2); + Assert.AreEqual(Categories_TestClass_static14_1.c1.intI, 1); + Assert.AreEqual(Categories_TestClass_static14.c1.intI, 2); } public static void testMethod() { @@ -833,8 +833,8 @@ public class Categories_TestClass_static15 public static Categories_TestClass_static15_Inter i1 = (Categories_TestClass_static15_Inter)new Categories_TestClass_static15_2(2); public static void Main_old() { - Assert.Equal(Categories_TestClass_static15_1.i1.intRet(), 1); - Assert.Equal(Categories_TestClass_static15.i1.intRet(), 2); + Assert.AreEqual(Categories_TestClass_static15_1.i1.intRet(), 1); + Assert.AreEqual(Categories_TestClass_static15.i1.intRet(), 2); } public static void testMethod() { @@ -850,8 +850,8 @@ public class Categories_TestClass_static16 public static int[] i = new int[] { 2 }; public static void Main_old() { - Assert.Equal(Categories_TestClass_static16_1.i[0], 1); - Assert.Equal(Categories_TestClass_static16.i[0], 2); + Assert.AreEqual(Categories_TestClass_static16_1.i[0], 1); + Assert.AreEqual(Categories_TestClass_static16.i[0], 2); } public static void testMethod() { @@ -876,8 +876,8 @@ public static int RetInt() public static Categories_TestClass_static17_Del d = new Categories_TestClass_static17_Del(RetInt); public static void Main_old() { - Assert.Equal(Categories_TestClass_static17_1.d(), 1); - Assert.Equal(Categories_TestClass_static17.d(), 2); + Assert.AreEqual(Categories_TestClass_static17_1.d(), 1); + Assert.AreEqual(Categories_TestClass_static17.d(), 2); } public static void testMethod() { @@ -897,14 +897,14 @@ public class Categories_TestClass_static18 public static bool b2; public static void Main_old() { - Assert.Equal(Categories_TestClass_static18.b1, (byte)0); - Assert.Equal(Categories_TestClass_static18.c1, '\x0000'); - Assert.Equal(Categories_TestClass_static18.s1, (short)0); - Assert.Equal(Categories_TestClass_static18.i1, 0); - Assert.Equal(Categories_TestClass_static18.l1, 0L); - Assert.Equal(Categories_TestClass_static18.f1, 0f); - Assert.Equal(Categories_TestClass_static18.d1, 0d); - Assert.Equal(Categories_TestClass_static18.b2, false); + Assert.AreEqual(Categories_TestClass_static18.b1, (byte)0); + Assert.AreEqual(Categories_TestClass_static18.c1, '\x0000'); + Assert.AreEqual(Categories_TestClass_static18.s1, (short)0); + Assert.AreEqual(Categories_TestClass_static18.i1, 0); + Assert.AreEqual(Categories_TestClass_static18.l1, 0L); + Assert.AreEqual(Categories_TestClass_static18.f1, 0f); + Assert.AreEqual(Categories_TestClass_static18.d1, 0d); + Assert.AreEqual(Categories_TestClass_static18.b2, false); } public static void testMethod() { @@ -929,14 +929,14 @@ public class Categories_TestClass_static19 static Categories_TestClass_static19_En ME; public static void Main_old() { - Assert.Equal(MS.b1, (byte)0); - Assert.Equal(MS.c1, '\x0000'); - Assert.Equal(MS.s1, (short)0); - Assert.Equal(MS.i1, 0); - Assert.Equal(MS.l1, 0L); - Assert.Equal(MS.f1, 0f); - Assert.Equal(MS.d1, 0d); - Assert.Equal(MS.b2, false); + Assert.AreEqual(MS.b1, (byte)0); + Assert.AreEqual(MS.c1, '\x0000'); + Assert.AreEqual(MS.s1, (short)0); + Assert.AreEqual(MS.i1, 0); + Assert.AreEqual(MS.l1, 0L); + Assert.AreEqual(MS.f1, 0f); + Assert.AreEqual(MS.d1, 0d); + Assert.AreEqual(MS.b2, false); if (ME != (Categories_TestClass_static19_En)0) { throw new Exception("Enums not equal"); @@ -960,11 +960,11 @@ public class Categories_TestClass_static20 public static Categories_TestClass_static20_Del MD;//delegate public static void Main_old() { - Assert.Null(Categories_TestClass_static20.MS); - Assert.Null(Categories_TestClass_static20.MI); - Assert.Null(Categories_TestClass_static20.MC); - Assert.Null(Categories_TestClass_static20.MA); - Assert.Null(Categories_TestClass_static20.MD); + Assert.IsNull(Categories_TestClass_static20.MS); + Assert.IsNull(Categories_TestClass_static20.MI); + Assert.IsNull(Categories_TestClass_static20.MC); + Assert.IsNull(Categories_TestClass_static20.MA); + Assert.IsNull(Categories_TestClass_static20.MD); } public static void testMethod() { @@ -1004,8 +1004,8 @@ public static void Main_old() { Categories_TestClass_inst018_1 Test1 = new Categories_TestClass_inst018_1(); Categories_TestClass_inst018 Test2 = new Categories_TestClass_inst018(); - Assert.Equal(Test1.b1, (byte)1); - Assert.Equal(Test2.b1, (byte)2); + Assert.AreEqual(Test1.b1, (byte)1); + Assert.AreEqual(Test2.b1, (byte)2); } public static void testMethod() { @@ -1023,8 +1023,8 @@ public static void Main_old() { Categories_TestClass_inst019_1 Test1 = new Categories_TestClass_inst019_1(); Categories_TestClass_inst019 Test2 = new Categories_TestClass_inst019(); - Assert.Equal(Test1.c1, 'a'); - Assert.Equal(Test2.c1, 'b'); + Assert.AreEqual(Test1.c1, 'a'); + Assert.AreEqual(Test2.c1, 'b'); } public static void testMethod() { @@ -1042,8 +1042,8 @@ public static void Main_old() { Categories_TestClass_inst020_1 Test1 = new Categories_TestClass_inst020_1(); Categories_TestClass_inst020 Test2 = new Categories_TestClass_inst020(); - Assert.Equal(Test1.s1, (short)1); - Assert.Equal(Test2.s1, (short)2); + Assert.AreEqual(Test1.s1, (short)1); + Assert.AreEqual(Test2.s1, (short)2); } public static void testMethod() { @@ -1061,8 +1061,8 @@ public static void Main_old() { Categories_TestClass_inst021_1 Test1 = new Categories_TestClass_inst021_1(); Categories_TestClass_inst021 Test2 = new Categories_TestClass_inst021(); - Assert.Equal(Test1.i1, 1); - Assert.Equal(Test2.i1, 2); + Assert.AreEqual(Test1.i1, 1); + Assert.AreEqual(Test2.i1, 2); } public static void testMethod() { @@ -1080,8 +1080,8 @@ public static void Main_old() { Categories_TestClass_inst022_1 Test1 = new Categories_TestClass_inst022_1(); Categories_TestClass_inst022 Test2 = new Categories_TestClass_inst022(); - Assert.Equal(Test1.l1, 1L); - Assert.Equal(Test2.l1, 2L); + Assert.AreEqual(Test1.l1, 1L); + Assert.AreEqual(Test2.l1, 2L); } public static void testMethod() { @@ -1099,8 +1099,8 @@ public static void Main_old() { Categories_TestClass_inst023_1 Test1 = new Categories_TestClass_inst023_1(); Categories_TestClass_inst023 Test2 = new Categories_TestClass_inst023(); - Assert.Equal(Test1.f1, 1f); - Assert.Equal(Test2.f1, 2f); + Assert.AreEqual(Test1.f1, 1f); + Assert.AreEqual(Test2.f1, 2f); } public static void testMethod() { @@ -1118,8 +1118,8 @@ public static void Main_old() { Categories_TestClass_inst024_1 Test1 = new Categories_TestClass_inst024_1(); Categories_TestClass_inst024 Test2 = new Categories_TestClass_inst024(); - Assert.Equal(Test1.d1, 1d); - Assert.Equal(Test2.d1, 2d); + Assert.AreEqual(Test1.d1, 1d); + Assert.AreEqual(Test2.d1, 2d); } public static void testMethod() { @@ -1137,8 +1137,8 @@ public static void Main_old() { Categories_TestClass_inst026_1 Test1 = new Categories_TestClass_inst026_1(); Categories_TestClass_inst026 Test2 = new Categories_TestClass_inst026(); - Assert.Equal(Test1.b1, true); - Assert.Equal(Test2.b1, false); + Assert.AreEqual(Test1.b1, true); + Assert.AreEqual(Test2.b1, false); } public static void testMethod() { @@ -1156,8 +1156,8 @@ public static void Main_old() { Categories_TestClass_inst028_1 Test1 = new Categories_TestClass_inst028_1(); Categories_TestClass_inst028 Test2 = new Categories_TestClass_inst028(); - Assert.True(Test1.s1.Equals("string1")); - Assert.True(Test2.s1.Equals("string2")); + Assert.IsTrue(Test1.s1.Equals("string1")); + Assert.IsTrue(Test2.s1.Equals("string2")); } public static void testMethod() { @@ -1183,8 +1183,8 @@ public static void Main_old() { Categories_TestClass_inst029_1 Test1 = new Categories_TestClass_inst029_1(); Categories_TestClass_inst029 Test2 = new Categories_TestClass_inst029(); - Assert.Equal(Test1.s1.intI, 1); - Assert.Equal(Test2.s1.intI, 2); + Assert.AreEqual(Test1.s1.intI, 1); + Assert.AreEqual(Test2.s1.intI, 2); } public static void testMethod() { @@ -1236,8 +1236,8 @@ public static void Main_old() { Categories_TestClass_inst031_1 Test1 = new Categories_TestClass_inst031_1(); Categories_TestClass_inst031 Test2 = new Categories_TestClass_inst031(); - Assert.Equal(Test1.c1.intI, 1); - Assert.Equal(Test2.c1.intI, 2); + Assert.AreEqual(Test1.c1.intI, 1); + Assert.AreEqual(Test2.c1.intI, 2); } public static void testMethod() { @@ -1271,8 +1271,8 @@ public static void Main_old() { Categories_TestClass_inst032_1 Test1 = new Categories_TestClass_inst032_1(); Categories_TestClass_inst032 Test2 = new Categories_TestClass_inst032(); - Assert.Equal(Test1.i1.intRet(), 1); - Assert.Equal(Test2.i1.intRet(), 2); + Assert.AreEqual(Test1.i1.intRet(), 1); + Assert.AreEqual(Test2.i1.intRet(), 2); } public static void testMethod() { @@ -1290,8 +1290,8 @@ public static void Main_old() { Categories_TestClass_inst033_1 Test1 = new Categories_TestClass_inst033_1(); Categories_TestClass_inst033 Test2 = new Categories_TestClass_inst033(); - Assert.Equal(Test1.i[0], 1); - Assert.Equal(Test2.i[0], 2); + Assert.AreEqual(Test1.i[0], 1); + Assert.AreEqual(Test2.i[0], 2); } public static void testMethod() { @@ -1318,8 +1318,8 @@ public static void Main_old() { Categories_TestClass_inst034_1 Test1 = new Categories_TestClass_inst034_1(); Categories_TestClass_inst034 Test2 = new Categories_TestClass_inst034(); - Assert.Equal(Test1.d(), 1); - Assert.Equal(Test2.d(), 2); + Assert.AreEqual(Test1.d(), 1); + Assert.AreEqual(Test2.d(), 2); } public static void testMethod() { @@ -1340,14 +1340,14 @@ public class Categories_TestClass_inst035 public static void Main_old() { Categories_TestClass_inst035 Test = new Categories_TestClass_inst035(); - Assert.Equal(Test.b1, (byte)0); - Assert.Equal(Test.c1, '\x0000'); - Assert.Equal(Test.s1, (short)0); - Assert.Equal(Test.i1, 0); - Assert.Equal(Test.l1, 0L); - Assert.Equal(Test.f1, 0f); - Assert.Equal(Test.d1, 0d); - Assert.Equal(Test.b2, false); + Assert.AreEqual(Test.b1, (byte)0); + Assert.AreEqual(Test.c1, '\x0000'); + Assert.AreEqual(Test.s1, (short)0); + Assert.AreEqual(Test.i1, 0); + Assert.AreEqual(Test.l1, 0L); + Assert.AreEqual(Test.f1, 0f); + Assert.AreEqual(Test.d1, 0d); + Assert.AreEqual(Test.b2, false); } public static void testMethod() { @@ -1367,11 +1367,11 @@ public class Categories_TestClass_inst036 public static void Main_old() { Categories_TestClass_inst036 Test = new Categories_TestClass_inst036(); - Assert.Null(Test.MS); - Assert.Null(Test.MI); - Assert.Null(Test.MC); - Assert.Null(Test.MA); - Assert.Null(Test.MD); + Assert.IsNull(Test.MS); + Assert.IsNull(Test.MI); + Assert.IsNull(Test.MC); + Assert.IsNull(Test.MA); + Assert.IsNull(Test.MD); } public static void testMethod() { @@ -1397,14 +1397,14 @@ public class Categories_TestClass_inst037 public static void Main_old() { Categories_TestClass_inst037 Test = new Categories_TestClass_inst037(); - Assert.Equal(Test.MS.b1, (byte)0); - Assert.Equal(Test.MS.c1, '\x0000'); - Assert.Equal(Test.MS.s1, (short)0); - Assert.Equal(Test.MS.i1, 0); - Assert.Equal(Test.MS.l1, 0L); - Assert.Equal(Test.MS.f1, 0f); - Assert.Equal(Test.MS.d1, 0d); - Assert.Equal(Test.MS.b2, false); + Assert.AreEqual(Test.MS.b1, (byte)0); + Assert.AreEqual(Test.MS.c1, '\x0000'); + Assert.AreEqual(Test.MS.s1, (short)0); + Assert.AreEqual(Test.MS.i1, 0); + Assert.AreEqual(Test.MS.l1, 0L); + Assert.AreEqual(Test.MS.f1, 0f); + Assert.AreEqual(Test.MS.d1, 0d); + Assert.AreEqual(Test.MS.b2, false); if (Test.ME != (Categories_TestClass_inst037_En)0) { throw new Exception("Enums are not equal"); @@ -1434,8 +1434,8 @@ public static void Main_old() { Categories_TestClass_inst038_Str1 Test1 = new Categories_TestClass_inst038_Str1((byte)1); Categories_TestClass_inst038 Test2 = new Categories_TestClass_inst038((byte)2); - Assert.Equal(Test1.b1, (byte)1); - Assert.Equal(Test2.b1, (byte)2); + Assert.AreEqual(Test1.b1, (byte)1); + Assert.AreEqual(Test2.b1, (byte)2); } public static void testMethod() { @@ -1461,8 +1461,8 @@ public static void Main_old() { Categories_TestClass_inst039_Str1 Test1 = new Categories_TestClass_inst039_Str1('a'); Categories_TestClass_inst039 Test2 = new Categories_TestClass_inst039('b'); - Assert.Equal(Test1.c1, 'a'); - Assert.Equal(Test2.c1, 'b'); + Assert.AreEqual(Test1.c1, 'a'); + Assert.AreEqual(Test2.c1, 'b'); } public static void testMethod() { @@ -1488,8 +1488,8 @@ public static void Main_old() { Categories_TestClass_inst040_Str1 Test1 = new Categories_TestClass_inst040_Str1((short)1); Categories_TestClass_inst040 Test2 = new Categories_TestClass_inst040((short)2); - Assert.Equal(Test1.s1, (short)1); - Assert.Equal(Test2.s1, (short)2); + Assert.AreEqual(Test1.s1, (short)1); + Assert.AreEqual(Test2.s1, (short)2); } public static void testMethod() { @@ -1515,8 +1515,8 @@ public static void Main_old() { Categories_TestClass_inst041_Str1 Test1 = new Categories_TestClass_inst041_Str1(1); Categories_TestClass_inst041 Test2 = new Categories_TestClass_inst041(2); - Assert.Equal(Test1.i1, 1); - Assert.Equal(Test2.i1, 2); + Assert.AreEqual(Test1.i1, 1); + Assert.AreEqual(Test2.i1, 2); } public static void testMethod() { @@ -1542,8 +1542,8 @@ public static void Main_old() { Categories_TestClass_inst042_Str1 Test1 = new Categories_TestClass_inst042_Str1(1L); Categories_TestClass_inst042 Test2 = new Categories_TestClass_inst042(2L); - Assert.Equal(Test1.l1, 1L); - Assert.Equal(Test2.l1, 2L); + Assert.AreEqual(Test1.l1, 1L); + Assert.AreEqual(Test2.l1, 2L); } public static void testMethod() { @@ -1569,8 +1569,8 @@ public static void Main_old() { Categories_TestClass_inst043_Str1 Test1 = new Categories_TestClass_inst043_Str1(1f); Categories_TestClass_inst043 Test2 = new Categories_TestClass_inst043(2f); - Assert.Equal(Test1.f1, 1f); - Assert.Equal(Test2.f1, 2f); + Assert.AreEqual(Test1.f1, 1f); + Assert.AreEqual(Test2.f1, 2f); } public static void testMethod() { @@ -1596,8 +1596,8 @@ public static void Main_old() { Categories_TestClass_inst044_Str1 Test1 = new Categories_TestClass_inst044_Str1(1d); Categories_TestClass_inst044 Test2 = new Categories_TestClass_inst044(2d); - Assert.Equal(Test1.d1, 1d); - Assert.Equal(Test2.d1, 2d); + Assert.AreEqual(Test1.d1, 1d); + Assert.AreEqual(Test2.d1, 2d); } public static void testMethod() { @@ -1623,8 +1623,8 @@ public static void Main_old() { Categories_TestClass_inst046_Str1 Test1 = new Categories_TestClass_inst046_Str1(true); Categories_TestClass_inst046 Test2 = new Categories_TestClass_inst046(false); - Assert.Equal(Test1.b1, true); - Assert.Equal(Test2.b1, false); + Assert.AreEqual(Test1.b1, true); + Assert.AreEqual(Test2.b1, false); } public static void testMethod() { @@ -1650,8 +1650,8 @@ public static void Main_old() { Categories_TestClass_inst048_Str1 Test1 = new Categories_TestClass_inst048_Str1("string1"); Categories_TestClass_inst048 Test2 = new Categories_TestClass_inst048("string2"); - Assert.True(Test1.s1.Equals("string1")); - Assert.True(Test2.s1.Equals("string2")); + Assert.IsTrue(Test1.s1.Equals("string1")); + Assert.IsTrue(Test2.s1.Equals("string2")); } public static void testMethod() { @@ -1685,8 +1685,8 @@ public static void Main_old() { Categories_TestClass_inst049_Str1 Test1 = new Categories_TestClass_inst049_Str1(0); Categories_TestClass_inst049 Test2 = new Categories_TestClass_inst049(0); - Assert.Equal(Test1.s1.intI, 1); - Assert.Equal(Test2.s1.intI, 2); + Assert.AreEqual(Test1.s1.intI, 1); + Assert.AreEqual(Test2.s1.intI, 2); } public static void testMethod() { @@ -1754,8 +1754,8 @@ public static void Main_old() { Categories_TestClass_inst051_Str1 Test1 = new Categories_TestClass_inst051_Str1(0); Categories_TestClass_inst051 Test2 = new Categories_TestClass_inst051(0); - Assert.Equal(Test1.c1.intI, 1); - Assert.Equal(Test2.c1.intI, 2); + Assert.AreEqual(Test1.c1.intI, 1); + Assert.AreEqual(Test2.c1.intI, 2); } public static void testMethod() { @@ -1798,8 +1798,8 @@ public static void Main_old() { Categories_TestClass_inst052_Str1 Test1 = new Categories_TestClass_inst052_Str1(0); Categories_TestClass_inst052 Test2 = new Categories_TestClass_inst052(0); - Assert.Equal(Test1.i1.intRet(), 1); - Assert.Equal(Test2.i1.intRet(), 2); + Assert.AreEqual(Test1.i1.intRet(), 1); + Assert.AreEqual(Test2.i1.intRet(), 2); } public static void testMethod() { @@ -1826,8 +1826,8 @@ public static void Main_old() { Categories_TestClass_inst053_Str1 Test1 = new Categories_TestClass_inst053_Str1(0); Categories_TestClass_inst053 Test2 = new Categories_TestClass_inst053(0); - Assert.Equal(Test1.i[0], 1); - Assert.Equal(Test2.i[0], 2); + Assert.AreEqual(Test1.i[0], 1); + Assert.AreEqual(Test2.i[0], 2); } public static void testMethod() { @@ -1863,8 +1863,8 @@ public static void Main_old() { Categories_TestClass_inst054_Str1 Test1 = new Categories_TestClass_inst054_Str1(0); Categories_TestClass_inst054 Test2 = new Categories_TestClass_inst054(0); - Assert.Equal(Test1.d(), 1); - Assert.Equal(Test2.d(), 2); + Assert.AreEqual(Test1.d(), 1); + Assert.AreEqual(Test2.d(), 2); } public static void testMethod() { diff --git a/Tests/NFUnitTestVariables/NFUnitTestVariables.nfproj b/Tests/NFUnitTestVariables/NFUnitTestVariables.nfproj index 0aa0f7e9..142a6d85 100644 --- a/Tests/NFUnitTestVariables/NFUnitTestVariables.nfproj +++ b/Tests/NFUnitTestVariables/NFUnitTestVariables.nfproj @@ -35,7 +35,7 @@ - + @@ -45,6 +45,6 @@ Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder. - + \ No newline at end of file diff --git a/Tests/NFUnitTestVariables/VariableTests.cs b/Tests/NFUnitTestVariables/VariableTests.cs index 3cc28968..a2cb12b0 100644 --- a/Tests/NFUnitTestVariables/VariableTests.cs +++ b/Tests/NFUnitTestVariables/VariableTests.cs @@ -202,10 +202,10 @@ public static void Variables_EqualTest_00() int one_is_one = one; int two_is_two = two; - Assert.True(one_is_one.Equals(one), "one_is_one should be equal one"); - Assert.True(two_is_two.Equals(two), "two_is_two should be equal two"); - Assert.False(two_is_two.Equals(one), "two_is_two should NOT be equal one"); - Assert.False(one_is_one.Equals(two), "one_is_one should NOT be equal two"); + Assert.IsTrue(one_is_one.Equals(one), "one_is_one should be equal one"); + Assert.IsTrue(two_is_two.Equals(two), "two_is_two should be equal two"); + Assert.IsFalse(two_is_two.Equals(one), "two_is_two should NOT be equal one"); + Assert.IsFalse(one_is_one.Equals(two), "one_is_one should NOT be equal two"); } { @@ -216,10 +216,10 @@ public static void Variables_EqualTest_00() uint one_is_one = one; uint two_is_two = two; - Assert.True(one_is_one.Equals(one), "one_is_one should be equal one"); - Assert.True(two_is_two.Equals(two), "two_is_two should be equal two"); - Assert.False(two_is_two.Equals(one), "two_is_two should NOT be equal one"); - Assert.False(one_is_one.Equals(two), "one_is_one should NOT be equal two"); + Assert.IsTrue(one_is_one.Equals(one), "one_is_one should be equal one"); + Assert.IsTrue(two_is_two.Equals(two), "two_is_two should be equal two"); + Assert.IsFalse(two_is_two.Equals(one), "two_is_two should NOT be equal one"); + Assert.IsFalse(one_is_one.Equals(two), "one_is_one should NOT be equal two"); } { @@ -230,10 +230,10 @@ public static void Variables_EqualTest_00() float one_is_one = one; float two_is_two = two; - Assert.True(one_is_one.Equals(one), "one_is_one should be equal one"); - Assert.True(two_is_two.Equals(two), "two_is_two should be equal two"); - Assert.False(two_is_two.Equals(one), "two_is_two should NOT be equal one"); - Assert.False(one_is_one.Equals(two), "one_is_one should NOT be equal two"); + Assert.IsTrue(one_is_one.Equals(one), "one_is_one should be equal one"); + Assert.IsTrue(two_is_two.Equals(two), "two_is_two should be equal two"); + Assert.IsFalse(two_is_two.Equals(one), "two_is_two should NOT be equal one"); + Assert.IsFalse(one_is_one.Equals(two), "one_is_one should NOT be equal two"); } { @@ -244,10 +244,10 @@ public static void Variables_EqualTest_00() double one_is_one = one; double two_is_two = two; - Assert.True(one_is_one.Equals(one), "one_is_one should be equal one"); - Assert.True(two_is_two.Equals(two), "two_is_two should be equal two"); - Assert.False(two_is_two.Equals(one), "two_is_two should NOT be equal one"); - Assert.False(one_is_one.Equals(two), "one_is_one should NOT be equal two"); + Assert.IsTrue(one_is_one.Equals(one), "one_is_one should be equal one"); + Assert.IsTrue(two_is_two.Equals(two), "two_is_two should be equal two"); + Assert.IsFalse(two_is_two.Equals(one), "two_is_two should NOT be equal one"); + Assert.IsFalse(one_is_one.Equals(two), "one_is_one should NOT be equal two"); } }