public void birthdayTests()
        {
            BirthdayChocolate chocolate = new BirthdayChocolate();

            Assert.Equal(2, chocolate.birthday(new List <int>()
            {
                1, 2, 1, 3, 2
            }, 3, 2));
        }
        public void Birthday_ShouldReturnNumberOfChocolatePieces(int[] squares, int day, int month, int expectedRes)
        {
            //Arrange

            //Act
            int result = BirthdayChocolate.Birthday(squares.ToList(), day, month);

            //Assert
            Assert.AreEqual(expectedRes, result);
        }
예제 #3
0
        static void birthdayChocolate()
        {
            List <int> s = new List <int> {
                1, 2, 1, 3, 2
            };
            int d = 3;
            int m = 2;

            int result = BirthdayChocolate.birthday(s, d, m);

            Console.WriteLine("Birthday Chocolate");
            Console.WriteLine(result);
        }