示例#1
0
        public void CountingValleysTest()
        {
            int[] results = new int[3];

            results[0] = WarmUpChallenges.CountingValleys(8, "UDDDUDUU");
            results[1] = WarmUpChallenges.CountingValleys(16, "UDDDUDUUUDDDUDUU");
            results[2] = WarmUpChallenges.CountingValleys(24, "UDDDUDUUUDDDUDUUUDDDUDUU");

            Console.WriteLine(results.ToString());

            Assert.AreEqual(Convert.ToInt32(6), Convert.ToInt32(results.Sum()));
        }
示例#2
0
 public int CountingValleysTest(int number, string text)
 => WarmUpChallenges.CountingValleys(number, text);