AddInvestmentToPortfolio() public méthode

public AddInvestmentToPortfolio ( Investment investment ) : void
investment Investment
Résultat void
Exemple #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);
 }
Exemple #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);
 }