public void MixList()
        {
            Problem2 p2 = new Problem2();
            var result = p2.MixList(basicArray1, basicArray2);

            if (expectedArray.Length != result.Length)
            {
                throw new Exception("Array differs in number of elements");
            }

            for (int i = 0; i < expectedArray.Length; i++)
            {
                Assert.AreEqual(expectedArray[i], result[i]);
            }
        }
示例#2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Problem 1:");
            Console.WriteLine(Problem1.Process(LoremIpsum, 70));
            Console.WriteLine();

            //Uncomment these lines to test your second solution.
            Console.WriteLine("Problem 2:");
            foreach (var result in Problem2.Process(LoremIpsum))
            {
                Console.WriteLine("Word: " + result.Key + " Count: " + result.Value);
            }

            Console.WriteLine();

            Console.WriteLine("Press any key to continue.");
            Console.ReadKey();
        }
 public void MixListException()
 {
     Problem2 p2 = new Problem2();
     var result = p2.MixList(new string[] { "1" }, basicArray2);
 }