コード例 #1
0
        public void TestDuplicates()
        {
            const int amount = 3;
            var       coins  = new[] { 1, 2 };

            CoinChangeCalculator.CalculateNumberOfChangeCombinations(amount, coins).Should().Be(2);
        }
コード例 #2
0
        public void TestExample()
        {
            const int amount = 5;
            var       coins  = new[] { 1, 2, 5 };

            CoinChangeCalculator.CalculateNumberOfChangeCombinations(amount, coins).Should().Be(4);
        }