public async Task GetLocaleFromActivity() { void ValidateResponses(Activity[] activities) { // no need to do anything. } var a = new SimpleAdapter(ValidateResponses); var c = new TurnContext(a, new Activity()); var activityId = Guid.NewGuid().ToString(); var activity = TestMessage.Message(); activity.Id = activityId; activity.Locale = "de-DE"; Task SimpleCallback(ITurnContext turnContext, CancellationToken cancellationToken) { Assert.Equal("de-DE", ((TurnContext)turnContext).Locale); return(Task.CompletedTask); } await a.ProcessRequest(activity, SimpleCallback, default(CancellationToken)); }
public void RequestIsSet() { var c = new TurnContext(new SimpleAdapter(), TestMessage.Message()); Assert.True(c.Activity.Id == "1234"); }
public async Task RequestIsSet() { TurnContext c = new TurnContext(new SimpleAdapter(), TestMessage.Message()); Assert.IsTrue(c.Activity.Id == "1234"); }