Beispiel #1
0
        public void Test_close_should_return_total_investment_amount()
        {
            StockHistory history    = new StockHistory();
            Quote        quote      = new Quote(1, 2);
            Broker       broker     = new Broker(0);
            Investment   investment = new Investment(history, broker);

            DateTime closeDate = new DateTime(2020, 3, 1);
            Wallet   wallet    = new Wallet();

            wallet.AddStocks(10);
            double totalPrice = 20;

            history.Add(closeDate, quote);

            Assert.AreEqual(totalPrice, investment.Close(wallet, closeDate));
        }