ApplyRemaining() public method

public ApplyRemaining ( Amount amount ) : Amount
amount Amount
return Amount
Exemplo n.º 1
0
 public void ShouldSplitOutlayMoneyAccordingToRatio()
 {
     var venture = new Venture(new Name("venture-name"), new Amount(100), new Amount(10));
     var firstVentureName = new Name("new-venture-1");
     var secondVentureName = new Name("new-venture-2");
     var percentage = new Percentage(0.2f);
     var terms = new TermsOfSplit(percentage, firstVentureName, secondVentureName);
     venture.AddOffer(new Investor(new Name("testName"), new Amount(1000)), new Amount(100));
     venture.Start();
     var ventures = venture.Split(terms);
     Assert.AreEqual(percentage.Apply(venture.Outlay), ventures.First().Outlay);
     Assert.AreEqual(percentage.ApplyRemaining(venture.Outlay), ventures.Last().Outlay);
 }
Exemplo n.º 2
0
 public void ShouldBeAbleToApplyRemainingPercentage()
 {
     var percentage = new Percentage(0.4f);
     Assert.AreEqual(new Amount(60.0f).Denomination, percentage.ApplyRemaining(new Amount(100)).Denomination,0.1f);
 }