public void AddStock(StockInputModel model)
        {
            var stock = model.AsStock();

            _fund.Add(stock);
            UpdateStocks();
        }
Ejemplo n.º 2
0
        public void AsStockReturnsNewBondForBondType()
        {
            var sut = new StockInputModel("10,0", "10", "Bond");

            Assert.IsInstanceOf(typeof(Bond), sut.AsStock());
        }
Ejemplo n.º 3
0
        public void AsStockReturnsNewBondForEquityType()
        {
            var sut = new StockInputModel("10,0", "10", "Equity");

            Assert.IsInstanceOf(typeof(Equity), sut.AsStock());
        }