private static async Task GetAPIPathsAsync(ITurnContext turnContext, CancellationToken cancellationToken, OpenApiDocument openApiDocument) { var paths = GetApiPathHandler.AvailablePhysicalPath(openApiDocument); var card = new HeroCard { Title = "Below are the avialable paths:", Buttons = new List <CardAction>(), }; foreach (var path in paths) { card.Buttons.Add(new CardAction(ActionTypes.PostBack, title: path, value: path)); } var reply = MessageFactory.Attachment(card.ToAttachment()); await turnContext.SendActivityAsync(reply, cancellationToken); }
public void GetPhysicalPathTest() { var response = GetApiPathHandler.AvailablePhysicalPath(dummyUserProfile.ApiObject); Assert.AreEqual(5, response.Count); }