Beispiel #1
0
        public void GivenUri_ReturnStockList(IStockLoader stockLoader)
        {
            var uri = "../../../../CheckoutKata/StockList.json";

            var stock = stockLoader.LoadStock(uri);

            Assert.True(stock.Any());
        }
Beispiel #2
0
 public Checkout(IStockLoader fileLoader)
 {
     _itemTypes = fileLoader.LoadStock("../../../../CheckoutKata/StockList.json");
 }
Beispiel #3
0
        public void GivenInvalidUri_ThrowArgumentException(IStockLoader stockLoader)
        {
            var uri = "invalidFile.txt";

            Assert.Throws <FileNotFoundException>(() => stockLoader.LoadStock(uri));
        }
Beispiel #4
0
 public StockProcessor(AnalyzerDbContext dbContext, IStockLoader loader)
 {
     _dbContext = dbContext;
     _loader    = loader;
 }