SonarLint.VisualStudio.Integration.UnitTests.ConfigurableVsOutputWindowPane.AssertMessageContainsAllWordsCaseSensitive C# (CSharp) Method

AssertMessageContainsAllWordsCaseSensitive() public method

public AssertMessageContainsAllWordsCaseSensitive ( int messageIndex, string words, char splitter = null ) : void
messageIndex int
words string
splitter char
return void
        public void AssertMessageContainsAllWordsCaseSensitive(int messageIndex, string[] words, char[] splitter = null)
        {
            Assert.IsTrue(this.outputStrings.Count > messageIndex, "Message not found for specified index {0}", messageIndex);

            var allWords = new HashSet<string>(this.outputStrings[messageIndex].Split(splitter, StringSplitOptions.RemoveEmptyEntries));
            Assert.IsTrue(allWords.IsSupersetOf(words), "Not all words found. Missing: {0}.\nAll words: {1}", string.Join(", ", words.Except(allWords)), string.Join(" ", allWords));
        }