Пример #1
0
 public Controller(string[] args)
 {
     try
     {
         _fileName = args[0] as string;
         _requestedAmount = Int32.Parse(args[1]);
         _marketData = new MarketModel(_fileName, true);
     }
     catch (ArgumentNullException ex)
     {
         throw new ArgumentException(ex.Message);
     }
     catch (FormatException ex)
     {
         throw new ArgumentException(ex.Message);
     }
 }
Пример #2
0
 public void If_File_Not_Found_In_Current_Assembly_Location_Throws_Error()
 {
     var fileName = Guid.NewGuid().ToString(); //make sure the file doesn't happen to exist
     var marketData = new MarketModel(fileName, true);
 }