Package io.micronaut.function.aws.proxy
Class MockLambdaContext
java.lang.Object
io.micronaut.function.aws.proxy.MockLambdaContext
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.Context
public class MockLambdaContext
extends Object
implements com.amazonaws.services.lambda.runtime.Context
Implementation of
Context
which returns null for every overriden method. For example ot use it in tests.- Since:
- 4.0.0
- Author:
- Sergio del Amo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.amazonaws.services.lambda.runtime.ClientContext
com.amazonaws.services.lambda.runtime.CognitoIdentity
com.amazonaws.services.lambda.runtime.LambdaLogger
int
int
-
Constructor Details
-
MockLambdaContext
public MockLambdaContext()
-
-
Method Details
-
getAwsRequestId
- Specified by:
getAwsRequestId
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getLogGroupName
- Specified by:
getLogGroupName
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getLogStreamName
- Specified by:
getLogStreamName
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getFunctionName
- Specified by:
getFunctionName
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getFunctionVersion
- Specified by:
getFunctionVersion
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getInvokedFunctionArn
- Specified by:
getInvokedFunctionArn
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getIdentity
public com.amazonaws.services.lambda.runtime.CognitoIdentity getIdentity()- Specified by:
getIdentity
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getClientContext
public com.amazonaws.services.lambda.runtime.ClientContext getClientContext()- Specified by:
getClientContext
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getRemainingTimeInMillis
public int getRemainingTimeInMillis()- Specified by:
getRemainingTimeInMillis
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getMemoryLimitInMB
public int getMemoryLimitInMB()- Specified by:
getMemoryLimitInMB
in interfacecom.amazonaws.services.lambda.runtime.Context
-
getLogger
public com.amazonaws.services.lambda.runtime.LambdaLogger getLogger()- Specified by:
getLogger
in interfacecom.amazonaws.services.lambda.runtime.Context
-