public void InstantiatedAndExecutedOnce_Success() { Output response; var context = new TestLambdaContext(); using (var bt = new BlockTelemeter("Test", _output.WriteLine, false)) { var function = new Startup(); bt.Snap("Startup"); response = function.Handle(null, context); } Assert.NotNull(response); Assert.Equal("Hello World!", response.Message); }
public async Task SearchFunctionTest() { var searchInput = new SearchInput { Num = 15, Text = "is" }; MultiItemOutput response; var context = new TestLambdaContext(); using (var bt = new BlockTelemeter("Test", _output.WriteLine, false)) { var function = new SearchFunction(); bt.Snap("Startup"); response = await function.HandleAsync(searchInput, context); } Assert.NotNull(response?.Value); Assert.NotEmpty(response.Value); }