Ejemplo n.º 1
0
 public void Test_Number_Check()
 {
     try
     {
         ExamHelper.NumberCheck();
     }
     catch (DivideByZeroException eDivByZero)
     {
         Console.WriteLine("Arithmetic exception");
         Console.WriteLine("Exception caught: " + eDivByZero.Message);
     }
 }
Ejemplo n.º 2
0
 public void Test_Weekly_Wages()
 {
     try
     {
         ExamHelper.WeeklyWages();
     }
     catch (IndexOutOfRangeException eOutOfRange)
     {
         Console.WriteLine("Error in loop termination");
         Console.WriteLine("Exception caught: " + eOutOfRange.Message);
     }
 }
Ejemplo n.º 3
0
 public void Test_Calc_Result()
 {
     try
     {
         ExamHelper.CalculateResult();
     }
     catch (FormatException eFormat)
     {
         Console.WriteLine("Error in Format");
         Console.WriteLine("Exception caught: " + eFormat.Message);
     }
 }