public async Task NewsReceiverUnitTest() { var message = new Message { From = UnitTestBuilder.GetUserNode(), To = UnitTestBuilder.GetBotNode(), Content = PlainText.Parse("UnitTests") }; bool success = false; try { success = await flowService.SendNewsFlowAsync(message, CancellationToken.None); } catch (Exception ex) { ex.ShouldBeNull(); } finally { success.ShouldBeTrue(); } }
protected override async Task ReceiveMessageAsync(Message message, Contact contact, UserContext userContext, CancellationToken cancellationToken) { await _flowService.SendNewsFlowAsync(message, cancellationToken); }