public void Pattern_matching_is_case_insensitive() { var input = "HELLO"; var pattern = "[a-z]*"; StringMatching.MatchesPattern(input, pattern).Should().BeTrue(); }
public void Exact_text_match_with_no_special_characters_should_return_true() { var input = "Hello"; var pattern = "Hello"; StringMatching.MatchesPattern(input, pattern).Should().BeTrue(); }
public void Patterns_that_do_not_match_input_should_return_false() { var input = "Hello"; var pattern = "^[a]*$"; StringMatching.MatchesPattern(input, pattern).Should().BeFalse(); }
public void Matches_with_valid_regexes_should_return_true() { var input = "Hello"; var pattern = "[A-Za-z]*"; StringMatching.MatchesPattern(input, pattern).Should().BeTrue(); }
public void Non_matching_text_with_no_special_characters_should_return_false() { var input = "Hello"; var pattern = "Goodbye"; StringMatching.MatchesPattern(input, pattern).Should().BeFalse(); }
public IActivityAssertions TypeLike(string activityTypePattern) { if (!StringMatching.MatchesPattern(_activity.Type, activityTypePattern)) { ThrowPatternException(nameof(_activity.Type), activityTypePattern, _activity.Type); } return(this); }
public IActivityAssertions IdLike(string idPattern) { if (!StringMatching.MatchesPattern(_activity.Id, idPattern)) { ThrowPatternException(nameof(_activity.Id), idPattern, _activity.Id); } return(this); }
public IMessageAssertions SummaryLike(string pattern) { if (!StringMatching.MatchesPattern(_message.Summary, pattern)) { ThrowPatternException(nameof(_message.Summary), pattern, _message.Summary); } return(this); }
public IMessageAssertions TextLike(string pattern) { if (!StringMatching.MatchesPattern(_message.Text, pattern)) { ThrowPatternException(nameof(_message.Text), pattern, _message.Text); } return(this); }