コード例 #1
0
        public void Should_return_true_if_strings_exactly_match()
        {
            var input   = "Hello";
            var matches = "Hello";

            StringMatching.Matches(input, matches).Should().BeTrue();
        }
コード例 #2
0
        public void Matches_should_be_case_insensitive()
        {
            var input           = "Hello";
            var ignoreCaseMatch = "HELLO";

            StringMatching.Matches(input, ignoreCaseMatch).Should().BeTrue();
        }
コード例 #3
0
        public void Should_return_false_if_strings_dont_exactly_match()
        {
            var input       = "Hello";
            var doesntMatch = "Bye";

            StringMatching.Matches(input, doesntMatch).Should().BeFalse();
        }
コード例 #4
0
        public IActivityAssertions TypeIs(string activityType)
        {
            if (!StringMatching.Matches(_activity.Type, activityType))
            {
                ThrowMatchException(nameof(_activity.Type), activityType, _activity.Type);
            }

            return(this);
        }
コード例 #5
0
        public IActivityAssertions IdIs(string id)
        {
            if (!StringMatching.Matches(_activity.Id, id))
            {
                ThrowMatchException(nameof(_activity.Id), id, _activity.Id);
            }

            return(this);
        }
コード例 #6
0
        public IActivityAssertions ChannelIdIs(string channelId)
        {
            if (!StringMatching.Matches(_activity.ChannelId, channelId))
            {
                ThrowMatchException(nameof(_activity.ChannelId), channelId, _activity.ChannelId);
            }

            return(this);
        }
コード例 #7
0
        public IMessageAssertions SummaryIs(string shouldMatch)
        {
            if (!StringMatching.Matches(_message.Summary, shouldMatch))
            {
                ThrowMatchException(nameof(_message.Summary), shouldMatch, _message.Summary);
            }

            return(this);
        }
コード例 #8
0
        public IMessageAssertions TextIs(string shouldMatch)
        {
            if (!StringMatching.Matches(_message.Text, shouldMatch))
            {
                ThrowMatchException(nameof(_message.Text), shouldMatch, _message.Text);
            }

            return(this);
        }