C# Unit Test – Extend a Customized Assert Test Method

C# Unit Test – Extend a Customized Assert Test Method

 
   using System;
   using Microsoft.VisualStudio.TestTools.UnitTesting;
 
   [TestClass]
   public class CustomizedTestCase
   {
      [TestMethod]
      public void TestMethod1()
      {
         CustomizedAssert.AreEqual(1, 1, "Both Value are Different.");
      }
   }
 
   public class CustomizedAssert
   {
      public static void AreEqual(int NumA, int NumB, string Message)
      {
         if (NumA != NumB)
            throw new AssertFailedException(Message);
      }
   }