예제 #1
0
        public async Task Handle_Test1(AuthenticationResult authenticationResult, int statusCode)
        {
            // Arrange
            mockAuthentication
            .Setup(mock => mock.Authenticate(It.IsAny <APIGatewayProxyRequest>()))
            .Returns(authenticationResult);

            // Act
            var result = await lambdaHandler.Handle(null, null);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(statusCode, result.StatusCode);
        }
예제 #2
0
 public async Task <APIGatewayProxyResponse> FunctionHandler(
     APIGatewayProxyRequest input,
     ILambdaContext context)
 {
     return(await lambdaHandler.Handle(input, context));
 }