public void ShouldReturnCorrectTotalMarketValue() { _fund.AddStock(1, 100, StockType.Equity); _fund.AddStock(2, 200, StockType.Equity); _fund.AddStock(3, 300, StockType.Bond); Assert.AreEqual(1400, _fund.TotalMarketValue); }
public void Init() { fund = new Fund("UK Equity Tracker", new FundRepo()); fund.AddCash(50023.00M); fund.AddStock(new Stock() { Symbol = "ROBO" }, qty: 100, price: 8.22M); fund.AddStock(new Stock() { Symbol = "UNDE" }, qty: 500, price: 3.11M); fund.AddStock(new Stock() { Symbol = "ABAC" }, qty: 600, price: .39M); fund.AddStock(new Stock() { Symbol = "DODO" }, qty: 30, price: 12M); }