public Add ( |
||
investment | ||
Résultat | void |
public void Should_Be_Able_To_Calculate_Participation() { Holding holding = new Holding(); holding.Add(new Investment(new Investor(new Name("quarter"), new GringottsDate(DateTime.Now), new Amount(1500)), null, new Amount(250))); holding.Add(new Investment(new Investor(new Name("threeFourths"), new GringottsDate(DateTime.Now), new Amount(1000)), null, new Amount(750))); holding.DistributeDividends(new Amount(1000)); }
public void Should_Be_Able_To_Distribute_Dividends_Fairly() { Amount profit = new Amount(1000); Holding holding = new Holding(); holding.Add(new Investment(new Investor(new Name("quarter"), new GringottsDate(DateTime.Now), new Amount(1500)), null, new Amount(250))); holding.Add(new Investment(new Investor(new Name("threeFourths"), new GringottsDate(DateTime.Now), new Amount(1000)), null, new Amount(750))); holding.DistributeDividends(profit); }
public void ShouldBeAbleToCreateAndAddInvestmentsToHoldings() { var holding = new Holding(); var investor = new Investor(new Name("investor"), new Amount(50000)); holding.Add(new Investment(investor, null, new Amount(100))); }
private Holding GetSplittedHolding(Percentage percentage) { var aHolding = new Holding(); foreach (var investment in Investments) { Investment inv = new Investment(investment.Investor, percentage.Apply(investment.Value)); aHolding.Add(inv); inv.Investor.AddInvestmentToPortfolio(inv); } return aHolding; }
public void Should_Be_Able_To_Create_And_Add_Investments_To_Holdings() { Holding holding = new Holding(); Investor investor = new Investor(new Name("investor"), new GringottsDate(DateTime.Now), new Amount(50000)); holding.Add(new Investment(investor, null, new Amount(100))); }