コード例 #1
0
 // [Fact] fails in unit-test-land despite succeeding in iis-land
 public async Task HistoryCsvDoesNotError()
 {
     var stockHistory = new StubStockHistoryService();
     var dut = new StocksController(
         null,
         stockHistory,
         new YahooStockInformationService(),
         new StubStockNoteService(),
         null
     );
     var result = (await dut.HistoryCvs()) as FileStreamResult;
     Assert.Equal(result.FileDownloadName, "transactionHistory.csv");
 }
コード例 #2
0
 public async Task HistoryDoesNotError()
 {
     var stockHistory = new StubStockHistoryService();
     var dut = new StocksController(
         null,
         stockHistory,
         null,
         null,
         null
     );
     var result = (await dut.History()) as ViewResult;
     Assert.Equal(stockHistory.getTransactions(null, null), result.ViewData["transactions"]);
 }