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 Details

    • MockLambdaContext

      public MockLambdaContext()
  • Method Details

    • getAwsRequestId

      public String getAwsRequestId()
      Specified by:
      getAwsRequestId in interface com.amazonaws.services.lambda.runtime.Context
    • getLogGroupName

      public String getLogGroupName()
      Specified by:
      getLogGroupName in interface com.amazonaws.services.lambda.runtime.Context
    • getLogStreamName

      public String getLogStreamName()
      Specified by:
      getLogStreamName in interface com.amazonaws.services.lambda.runtime.Context
    • getFunctionName

      public String getFunctionName()
      Specified by:
      getFunctionName in interface com.amazonaws.services.lambda.runtime.Context
    • getFunctionVersion

      public String getFunctionVersion()
      Specified by:
      getFunctionVersion in interface com.amazonaws.services.lambda.runtime.Context
    • getInvokedFunctionArn

      public String getInvokedFunctionArn()
      Specified by:
      getInvokedFunctionArn in interface com.amazonaws.services.lambda.runtime.Context
    • getIdentity

      public com.amazonaws.services.lambda.runtime.CognitoIdentity getIdentity()
      Specified by:
      getIdentity in interface com.amazonaws.services.lambda.runtime.Context
    • getClientContext

      public com.amazonaws.services.lambda.runtime.ClientContext getClientContext()
      Specified by:
      getClientContext in interface com.amazonaws.services.lambda.runtime.Context
    • getRemainingTimeInMillis

      public int getRemainingTimeInMillis()
      Specified by:
      getRemainingTimeInMillis in interface com.amazonaws.services.lambda.runtime.Context
    • getMemoryLimitInMB

      public int getMemoryLimitInMB()
      Specified by:
      getMemoryLimitInMB in interface com.amazonaws.services.lambda.runtime.Context
    • getLogger

      public com.amazonaws.services.lambda.runtime.LambdaLogger getLogger()
      Specified by:
      getLogger in interface com.amazonaws.services.lambda.runtime.Context