示例#1
0
 public void OrderBookServiceTest(string providerName, string symbol, bool valid)
 {
     try
     {
         orderBookService.GetOrderBook(providerName, symbol);
         Assert.IsTrue(valid, "Valid result is expected");
     }
     catch (Exception e)
     {
         Console.WriteLine($"ERROR: {e.Message}");
         Assert.IsFalse(valid, "Invalid result is expected");
     }
 }
示例#2
0
 public OrderBook GetOrderBook(string providerCode, string symbol, string user)
 {
     try
     {
         var book = orderBookService.GetOrderBook(providerCode, symbol);
         AuditService.Instance.AddToLog(user, book);
         return(book);
     }
     catch (Exception e)
     {
         log.Error(e.Message, e);
         throw;
     }
 }