I am trying to check an IDialog stream with a fake message, therefore:
var toBot = new Message() { ConversationId = Guid.NewGuid().ToString(), Text = "Test", }; Func<IDialog<T>> MakeRoot = () => testDialog; toBot.From = new ChannelAccount(Guid.NewGuid().ToString()); toBot.To = new ChannelAccount(Guid.NewGuid().ToString());
When it gets into PromptDialog.Confirm, it throws a Microsoft.Rest.HttpOperationException exception in the Microsoft.Bot.Builder.dll exception (access exception).
If I do not create
toBot.From = new ChannelAccount(Guid.NewGuid().ToString());
it throws a System.NullReferenceException for ChannelId.
PromptDialog.Confirm is as follows:
PromptDialog.Confirm(context, AfterErrorConfirmationAsync, Strings.ConfirmError, Strings.InvalidInput);
How can I get around this problem?
source share