Example #1
0
 public void Initialising_Controller_With_One_Null_Argument_Throws_Error()
 {
     //null arguments
     var args = new string[2];
     args[0] = string.Empty;
     var controller = new Controller(args);
 }
Example #2
0
 static void Main(string[] args)
 {
     try
     {
         Console.WriteLine("Your requested loan will be rounded to the nearest 100.");
         var controller = new Controller(args);
         var formattedQuote = controller.GetQuote();
         Console.WriteLine(formattedQuote);
         Environment.Exit(0);
     }
     catch (ApplicationException ex)
     {
         Console.WriteLine(ex.Message);
         Environment.Exit(1);
     }
     catch (ArgumentException ex)
     {
         Console.WriteLine(ex.Message);
         Environment.Exit(1);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
         Environment.Exit(1);
     }
 }
Example #3
0
 public void Initialising_Controller_With_All_Null_Arguments_Throws_Error()
 {
     //both null arguments
     var args = new string[2];
     var controller = new Controller(args);
 }