// Wil only be included if _feedbackOptions.FeedbackEnabled is set to true private async Task <DialogTurnResult> RequestFeedback(WaterfallStepContext stepContext, CancellationToken cancellationToken) { return(await stepContext.PromptAsync(DialogIds.FeedbackPrompt, new PromptOptions() { Prompt = FeedbackUtil.CreateFeedbackActivity(stepContext.Context), })); }
public void Test_FeedbackActivity() { // Get TestAdapter var sp = Services.BuildServiceProvider(); var adapter = sp.GetService<TestAdapter>(); // Create EventActivity var eventActivity = new Activity() { ChannelId = "Test", Type = ActivityTypes.Message, Conversation = new ConversationAccount(id: $"{Guid.NewGuid()}"), From = new ChannelAccount(id: "Test", name: "Test"), Recipient = new ChannelAccount(id: "Test", name: "Test"), Value = "Test" }; // Create turnContext with EventActivity var turnContext = new TurnContext(adapter, eventActivity); var testFeedback = FeedbackUtil.CreateFeedbackActivity(turnContext); Assert.IsTrue(testFeedback.Text != null && testFeedback.Text.Contains(FeedbackResponses.FeedbackPromptMessage)); }