public void TypeMatching_should_not_throw_when_card_action_type_matches_expected_type() { var cardActions = CardActionTestData.CreateCardActionSetWithOneActionThatHasSetProperties(type: CallTypeString); var sut = new CardActionSetAssertions(cardActions); Action act = () => sut.ActionType(CallType); act.ShouldNotThrow <Exception>(); }
public void ImageMatching_should_pass_when_using_standard_regex_features(string image, string regex) { var cardActions = CardActionTestData.CreateCardActionSetWithOneActionThatHasSetProperties(image: image); var sut = new CardActionSetAssertions(cardActions); Action act = () => sut.ImageMatching(regex); act.ShouldNotThrow <Exception>(); }
public void ImageMatching_should_pass_if_regex_exactly_matches_Image_of_at_least_1_card_regardless_of_case(string image, string regex) { var cardActions = CardActionTestData.CreateCardActionSetWithOneActionThatHasSetProperties(image: image); var sut = new CardActionSetAssertions(cardActions); Action act = () => sut.ImageMatching(regex); act.ShouldNotThrow <Exception>(); }
public void ImageMatching_should_pass_if_regex_exactly_matches_message_Image_of_one_card(string cardImageAndRegex) { var cardActions = CardActionTestData.CreateCardActionSetWithOneActionThatHasSetProperties(image: cardImageAndRegex); var sut = new CardActionSetAssertions(cardActions); Action act = () => sut.ImageMatching(cardImageAndRegex); act.ShouldNotThrow <Exception>(); }
public void ImageMatching_should_output_matches_when_groupMatchingRegex_matches_Image_of_any_card() { IList <string> matches; const string someImage = "some text"; var cardActions = CardActionTestData.CreateCardActionSetWithOneActionThatHasSetProperties(image: someImage); var sut = new CardActionSetAssertions(cardActions); sut.ImageMatching(someImage, $"({someImage})", out matches); matches.First().Should().Be(someImage); }
public void ImageMatching_should_output_multiple_matches_when_groupMatchingRegex_matches_Image_several_times_for_a_single_card() { IList <string> matches; const string someImage = "some text"; var cardActions = CardActionTestData.CreateCardActionSetWithOneActionThatHasSetProperties(image: someImage); var sut = new CardActionSetAssertions(cardActions); const string match1 = "some"; const string match2 = "text"; sut.ImageMatching(someImage, $"({match1}) ({match2})", out matches); matches.Should().Contain(match1, match2); }