public static void Run(string text, string pattern, IConsole console)
        {
            // Execute
            var numOcccurence = NumberOfOccurence.RunUsingRegex(pattern, text);

            // Display result
            console.Out.WriteLine($"Result: { numOcccurence }");
        }
Beispiel #2
0
        public void RunUsingRegex_WhenCalled_ReturnsValidResult(string pattern, string text, int expected)
        {
            var actual = NumberOfOccurence.RunUsingRegex(pattern, text);

            Assert.Equal(expected, actual);
        }