public void Test_ExchangeRemoveStock() { string stock = "GIN"; double lastDividend = 8; double fixedDividend = 2; double parValue = 100; double stockPrice = 25; GBCE exchange = new GBCE(); exchange.addPreferredStock(stock, lastDividend, fixedDividend, parValue, stockPrice); stock = "POP"; lastDividend = 8; stockPrice = 25; exchange.addCommonStock(stock, lastDividend, stockPrice); //Now remove a stock Assert.AreEqual(2, exchange.stocks.Count); //Verify there are two stocks in the exchange exchange.removeStock(stock); Assert.AreEqual(1, exchange.stocks.Count); //Verify there is one stock in the exchange }
public void Test_ExchangeRemoveStockException() { string stock = "GIN"; double lastDividend = 8; double fixedDividend = 2; double parValue = 100; double stockPrice = 25; GBCE exchange = new GBCE(); exchange.addPreferredStock(stock, lastDividend, fixedDividend, parValue, stockPrice); stock = "POP"; exchange.removeStock(stock); }