コード例 #1
0
        public void SplitMatchWholeWords_Matches_Core_Split_With_Same_Option()
        {
            string input = "StackOverflow Stack OverStack";

            string[] delimiters = { "Stack" };
            string[] expected   = { "StackOverflow ", " OverStack" };

            var coreSplit = RegexUtility.Split(input, delimiters, splitOptions: SplitOptions.MatchWholeWords);
            var result    = RegexUtility.SplitMatchWholeWords(input, delimiters);

            result.ShouldBe(coreSplit);
            result.ShouldBe(expected);
        }