public void SetChoiceList(CameraChoiceList cameraChoiceList) { if (botData != null) { botData.SetProperty(CHOICE_LIST_COOKIE, cameraChoiceList); stateClient.BotState.SetUserData(channelId, userId, botData); } }
public void TestCameraChoiceList() { var choiceInfo = new CameraChoiceList(new List <string> { "Camera 1", "Camera 2" }); var builder = new CameraInfoReplyActivityBuilder(choiceInfo, cameraData.Object); var activity = ActivityTestUtils.CreateActivity(); var userData = new Mock <IUserData>(); var reply = builder.BuildReplyActivity(activity, userData.Object); reply.Text.Should().Contain(CameraInfoReplyActivityBuilder.CameraChoiceListPrompt); reply.Text.Should().Contain("1. Camera 1"); reply.Text.Should().Contain("2. Camera 2"); }