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); }
private Venture(Name name, Amount outlay) { this.name = name; Outlay = outlay; MinInvestment = new Amount(0); Subscription = new Subscription(); holding = new Holding(); }
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 static readonly string[] STATES = new string[] { PROPOSED_STATE, STARTED_STATE, CANCELLED_STATE, CLOSED_STATE }; public Venture(Name name, Amount outlay, Amount minInvestment) { if (minInvestment <= new Amount(0)) throw new Exception("Minimum investment must be greater than 0"); if (outlay < minInvestment) throw new Exception("Outlay must be greater than minimum investment"); Name = name; Outlay = outlay; MinInvestment = minInvestment; Subscription = new Subscription(); State = PROPOSED_STATE; holding = new Holding(); }
public Venture() { holding = new Holding(); }
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))); }
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))); }