Exemplo n.º 1
0
        public void VendingCash_GetChange_ExactChange_Success(decimal payment)
        {
            var vendingCash = new VendingCash();

            vendingCash.CanReturnChange(payment, new List <Denomination>
            {
                Currency.Pound,
                Currency.Penny
            }).Success.Should().BeTrue();
        }
Exemplo n.º 2
0
        public void VendingCash_GetChange_ChangeUnAvailable_FailureExpected(decimal payment)
        {
            var vendingCash = new VendingCash();

            vendingCash.AddCoins(new List <Denomination>
            {
                Currency.FivePence,
                Currency.FiftyPence,
                Currency.Pound,
                Currency.TenPence,
                Currency.TwentyPence,
                Currency.TwoPence,
                Currency.Pound,
                Currency.TwoPound,
                Currency.FiftyPence,
                Currency.Pound,
                Currency.FivePence
            });

            vendingCash.CanReturnChange(payment).Success.Should().BeFalse();
        }