public void MessagingExtensionActionInits() { var data = new Dictionary <string, string>() { { "key", "value" } }; var context = new TaskModuleRequestContext("theme"); var commandId = "commandId"; var commandContext = "message"; var botMessagePreviewAction = "send"; var botActivityPreview = new List <Activity>() { new Activity(text: "hi"), new Activity(text: "yo yo yo") }; var messagePayload = new MessageActionsPayload("msgId", "1234", "message"); var state = "secureOAuthState1234"; var msgExtAction = new MessagingExtensionAction(data, context, commandId, commandContext, botMessagePreviewAction, botActivityPreview, messagePayload) { State = state }; Assert.NotNull(msgExtAction); Assert.IsType <MessagingExtensionAction>(msgExtAction); Assert.Equal(data, msgExtAction.Data); Assert.Equal(context, msgExtAction.Context); Assert.Equal(commandId, msgExtAction.CommandId); Assert.Equal(commandContext, msgExtAction.CommandContext); Assert.Equal(botMessagePreviewAction, msgExtAction.BotMessagePreviewAction); Assert.Equal(botActivityPreview, msgExtAction.BotActivityPreview); Assert.Equal(messagePayload, msgExtAction.MessagePayload); Assert.Equal(state, msgExtAction.State); }
public void TaskModuleRequestContextInitsWithNoArgs() { var requestContext = new TaskModuleRequestContext(); Assert.NotNull(requestContext); Assert.IsType <TaskModuleRequestContext>(requestContext); }
public void TaskModuleRequestContextInits() { var theme = "chat"; var requestContext = new TaskModuleRequestContext(theme); Assert.NotNull(requestContext); Assert.IsType <TaskModuleRequestContext>(requestContext); Assert.Equal(theme, requestContext.Theme); }
public void TaskModuleRequestInits() { var data = new JObject() { { "key", "value" } }; var context = new TaskModuleRequestContext(); var tabEntityContext = new TabEntityContext(); var request = new TaskModuleRequest(data, context) { TabEntityContext = tabEntityContext }; Assert.NotNull(request); Assert.IsType <TaskModuleRequest>(request); Assert.Equal(data, request.Data); Assert.Equal(context, request.Context); Assert.Equal(tabEntityContext, request.TabEntityContext); }