Gringotts.Domain.Venture.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
        public virtual void Start()
        {
            if (!IsProposed())
                throw new Exception("Venture can only start from Proposed State");
            if (Subscription.Value < Outlay)
            {
                State = CANCELLED_STATE;
                throw new Exception("Venture cannot start with Total Subscription less than Outlay");
            }
            AddInvestmentsToHolding(Subscription.Confirm(Outlay));

            AddInvestmentsToPortfolio(Holding.Investments);
            ChangeStateToStarted();
        }

Usage Example

Exemplo n.º 1
0
 public void HoldingShouldBeCreatedWhenVentureStarts()
 {
     var venture = new Venture(new Name("Ventura"), new Amount(100), new Amount(1));
     var investor0 = new Investor(new Name("Investor0"),  new Amount(100));
     var investor1 = new Investor(new Name("Investor1"),  new Amount(100));
     venture.AddOffer(investor0, new Amount(50));
     venture.AddOffer(investor1, new Amount(50));
     venture.Start();
     Assert.Greater(venture.Holding.Investments.Count, 0);
 }
All Usage Examples Of Gringotts.Domain.Venture::Start