Example #1
0
 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));
 }
Example #2
0
 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);
 }
Example #3
0
 private Venture(Name name, Amount outlay)
 {
     this.name = name;
     Outlay = outlay;
     MinInvestment = new Amount(0);
     Subscription = new Subscription();
     holding = new Holding();
 }
Example #4
0
 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;
 }
Example #5
0
 //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();
 }
Example #6
0
 public Venture()
 {
     holding = new Holding();
 }
Example #7
0
 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)));
 }
Example #8
0
 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)));
 }