I have a collection of strings
var greetings = new[] { "Hello boy", "Hello girl", "Hello all"};
I would like to create an assertion using FluentAssertions that verifies that the collection contains at least one item that contains a given string.
Example. For the previous collection,
- testing with "boy", should pass.
- testing with "Girl" should pass.
- testing with "hello" should pass.
- testing with "ouch" should NOT pass (because there is not item in the collection that contains this string).
I've tried with:
greetings.Should().ContainMatch("*" + str + "*");
But it doesn't work becuase it's case sensitive.