Ejemplo n.º 1
0
        /// <summary>
        /// Qualify Goal 1 by testing the sample input from the site
        /// </summary>
        private static void UnitTest()
        {
            // Example
            const string TestText = @"abc

a
b
c

ab
ac

a
a
a
a

b";

            int sample = Goal1(TestText.Split('\n'));

            if (sample != 11)
            {
                throw new InvalidOperationException($"Expected 11, got {sample}");
            }

            sample = Goal2(TestText.Split('\n'));
            if (sample != 6)
            {
                throw new InvalidOperationException($"Expected 6, got {sample}");
            }
        }