AddInvestmentToPortfolio() public method

public AddInvestmentToPortfolio ( Investment investment ) : void
investment Investment
return void
Esempio n. 1
0
 public void ShouldBeAbleToAcceptInvestment()
 {
     var investor = new Investor(new Name("Inverstor1"), new Amount(1000));
     investor.AddInvestmentToPortfolio(new Investment(investor, null, new Amount(600)));
     Assert.AreEqual(new Amount(600), investor.PortfolioValue);
 }
Esempio n. 2
0
 public void Should_Be_Able_To_Accept_Investment()
 {
     Investor investor = new Investor(new Name("Inverstor1"), new GringottsDate(DateTime.Now), new Amount(1000));
     investor.AddInvestmentToPortfolio(new Investment(investor, null, new Amount(600)));
     Assert.AreEqual(new Amount(600), investor.PortfolioValue);
 }