예제 #1
0
        public static TestFlow AssertReplyContainAll(this TestFlow testFlow, string[] expected,
                                                     string description = null, uint timeout = 3000)
        {
            return(testFlow.AssertReply(
                       reply =>
            {
                if (expected.All(e => reply.AsMessageActivity().Text.Contains(e)))
                {
                    return;
                }

                throw new Exception(
                    $"{(description == null ? "" : description + "\n")}" +
                    $"Expected:{expected}\nReceived:{reply.AsMessageActivity().Text}");
            },
                       description,
                       timeout));
        }