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)); }
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; }
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)); }