I am using MSTest and Moq to write unit tests. I want to test that a method is called with the string parameter that contains sub-string.
_mockMessageService.Verify(x => x.ShowMessage(It.IsAny<string>()), Times.Once());
In above code, I can verify that ShowMessage method was called once with some string parameter but I want to make sure that string contain words like success, fail, partially success etc. I can't directly pass entire string because it is not consistent, only part of it is consistent. Is it possible?