public static async Task <IEnumerable <Message> > DeliverMessageAndConsumeResponseAsnyc(this TestHost host, Node from, string plainContent) { var result = new Message[2]; result[0] = await host.DeliverIncomingMessageAsync(from, plainContent); await host.WaitForConsumedAsync(); result[1] = await host.RetrieveOutgoingMessageAsync(); return(result); }
public static Task <Message> DeliverIncomingMessageAsync(this TestHost host, Node from, string plainContent) { return(DeliverIncomingMessageAsync(host, from, (Document) new PlainText { Text = plainContent })); }