Ejemplo n.º 1
0
        public void CountCombinationsTest_OneCoin_Should_Return_One(int money, int[] coins, int expected)
        {
            //arrange

            //act
            var acturl = CountingChangeCombinations.CountCombinations(money, coins);

            //assert
            Assert.AreEqual(expected, acturl);
        }
Ejemplo n.º 2
0
        public void CountCombinationsTest_NoChange_Should_Return_0()
        {
            //arrange
            var money    = 11;
            var coins    = new [] { 5, 7 };
            var expected = 0;

            //act
            var acturl = CountingChangeCombinations.CountCombinations(money, coins);

            //assert
            Assert.AreEqual(expected, acturl);
        }
Ejemplo n.º 3
0
 public static void NoChange()
 {
     Assert.AreEqual(0, CountingChangeCombinations.CountCombinations(11, new[] { 5, 7 }));
 }
Ejemplo n.º 4
0
 public static void SimpleCase()
 {
     Assert.AreEqual(3, CountingChangeCombinations.CountCombinations(4, new[] { 1, 2 }));
 }
Ejemplo n.º 5
0
 public static void AnotherSimpleCase()
 {
     Assert.AreEqual(4, CountingChangeCombinations.CountCombinations(10, new[] { 5, 2, 3 }));
 }