示例#1
0
        public void Allocate_To_Return_Should_Return_Largest_Denominations_Possible()
        {
            var money         = new Money(425, 1, 3, 4, 5, 6);
            var moneyToReturn = money.AllocateToReturn(4.25m);

            moneyToReturn.TwentyDollarCount.Should().Be(0);
            moneyToReturn.FiveDollarCount.Should().Be(0);
            moneyToReturn.OneDollarCount.Should().Be(4);
            moneyToReturn.QuarterCount.Should().Be(1);
            moneyToReturn.TenCentCount.Should().Be(0);
            moneyToReturn.OneCentCount.Should().Be(0);
        }