Ejemplo n.º 1
0
        public IReceiptItemAssertions TitleMatching(string regex, string groupMatchRegex, out IList <string> matchedGroups)
        {
            if (regex == null)
            {
                throw new ArgumentNullException(nameof(regex));
            }
            if (groupMatchRegex == null)
            {
                throw new ArgumentNullException(nameof(groupMatchRegex));
            }

            SetHelpers <ReceiptItem, ReceiptItemAssertionFailedException> .TestWithGroups act =
                (ReceiptItem item, out IList <string> matches) => item.That().TitleMatching(regex, groupMatchRegex, out matches);
            matchedGroups = _setHelpers.TestSetForMatchAndReturnGroups(ReceiptItems, act, CreateEx(nameof(ReceiptItem.Title), regex));

            return(this);
        }
Ejemplo n.º 2
0
        public IFactAssertions KeyMatching(string regex, string groupMatchRegex, out IList <string> matchedGroups)
        {
            if (regex == null)
            {
                throw new ArgumentNullException(nameof(regex));
            }
            if (groupMatchRegex == null)
            {
                throw new ArgumentNullException(nameof(groupMatchRegex));
            }

            SetHelpers <Fact, FactAssertionFailedException> .TestWithGroups act =
                (Fact fact, out IList <string> matches) => fact.That().KeyMatching(regex, groupMatchRegex, out matches);
            matchedGroups = _setHelper.TestSetForMatchAndReturnGroups(Facts, act, CreateEx(nameof(Fact.Key), regex));

            return(this);
        }
Ejemplo n.º 3
0
        public IThumbnailCardAssertions SubtitleMatching(string regex, string groupMatchRegex, out IList <string> matchedGroups)
        {
            if (regex == null)
            {
                throw new ArgumentNullException(nameof(regex));
            }
            if (groupMatchRegex == null)
            {
                throw new ArgumentNullException(nameof(groupMatchRegex));
            }

            SetHelpers <ThumbnailCard, ThumbnailCardAssertionFailedException> .TestWithGroups act
                          = (ThumbnailCard card, out IList <string> matches) => card.That().SubtitleMatching(regex, groupMatchRegex, out matches);
            matchedGroups = _setHelpers.TestSetForMatchAndReturnGroups(ThumbnailCards, act, CreateEx(nameof(ThumbnailCard.Subtitle), regex));

            return(this);
        }
Ejemplo n.º 4
0
        public IActivityAssertions FromMatching(string regex, string groupMatchRegex, out IList <string> matchedGroups)
        {
            if (regex == null)
            {
                throw new ArgumentNullException(nameof(regex));
            }
            if (groupMatchRegex == null)
            {
                throw new ArgumentNullException(nameof(groupMatchRegex));
            }

            SetHelpers <Activity, ActivityAssertionFailedException> .TestWithGroups act
                          = (Activity item, out IList <string> matches) => item.Should().FromMatching(regex, groupMatchRegex, out matches);
            matchedGroups = _setHelpers.TestSetForMatchAndReturnGroups(_messageSet, act, CreateEx(nameof(Activity.From), regex));

            return(this);
        }
Ejemplo n.º 5
0
        public ICardActionAssertions TitleMatching(string regex, string groupMatchingRegex, out IList <string> groupMatches)
        {
            if (regex == null)
            {
                throw new ArgumentNullException(nameof(regex));
            }
            if (groupMatchingRegex == null)
            {
                throw new ArgumentNullException(nameof(groupMatchingRegex));
            }

            SetHelpers <CardAction, CardActionAssertionFailedException> .TestWithGroups act
                = (CardAction item, out IList <string> matches) => item.That().TitleMatching(regex, groupMatchingRegex, out matches);

            groupMatches = _setHelpers.TestSetForMatchAndReturnGroups(CardActions, act, CreateEx(nameof(CardAction.Title), regex));

            return(this);
        }