AcceptOffer() public method

public AcceptOffer ( Offer offer ) : void
offer Offer
return void
示例#1
0
 public void ShouldBeAbleToAcceptOffer()
 {
     var investor = new Investor(new Name("Inverstor1"), new Amount(1000));
     var venture = new Venture(new Name("venture1"), new Amount(1000), new Amount(500));
     investor.AcceptOffer(new Offer(investor, new Amount(600), venture));
 }
示例#2
0
 public virtual Offer AddOffer(Investor investor, Amount investedAmount)
 {
     if (Subscription.AlreadyInvested(investor))
         throw new InvalidOfferException("Cannot invest more than once.");
     if (!MinimumInvestment(investedAmount))
         throw new InvalidOfferException("Investment amount less than the required minimum amount.");
     Offer offer = new Offer(investor, investedAmount, this);
     investor.AcceptOffer(offer);
     Subscription.Add(offer);
     return offer;
 }
示例#3
0
 public void Should_Be_Able_ToAccept_Offer()
 {
     Investor investor = new Investor(new Name("Inverstor1"), new GringottsDate(DateTime.Now), new Amount(1000));
     investor.AcceptOffer(new Offer(investor, new Amount(600), null));
 }