public void TestLaunchInstanceElicitNumberSlotEventFromSlack() { var json = File.ReadAllText(@"SampleTestFiles\LaunchInstanceElicitNumberSlotSlack.json"); var lexEvent = JsonConvert.DeserializeObject <LexEvent>(json); var lambdaFunction = new ChatbotStartupProgram(true); var context = new TestLambdaContext(); var response = lambdaFunction.LambdaFunctionHandler(lexEvent, context); Assert.Equal("ElicitSlot", response.DialogAction.Type); }
public void TestDialogCodeHook() { var json = File.ReadAllText(@"SampleTestFiles\start-ec2-lex-dialog-code-hook.json"); var lexEvent = JsonConvert.DeserializeObject <LexEvent>(json); var lambdaFunction = new ChatbotStartupProgram(true); var context = new TestLambdaContext(); var response = lambdaFunction.LambdaFunctionHandler(lexEvent, context); Assert.Equal("ElicitSlot", response.DialogAction.Type); }