All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.unit.nva.stubs.FakeContext Maven / Gradle / Ivy

The newest version!
package no.unit.nva.stubs;

import com.amazonaws.services.lambda.runtime.ClientContext;
import com.amazonaws.services.lambda.runtime.CognitoIdentity;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.LambdaLogger;
import java.util.UUID;
import nva.commons.core.JacocoGenerated;

@JacocoGenerated
public class FakeContext implements Context {

    private final String awsRequestId = UUID.randomUUID().toString();
    private final LambdaLogger logger = new TestLogger();

    @Override
    public String getAwsRequestId() {
        return awsRequestId;
    }

    @Override
    public String getLogGroupName() {
        throw new UnsupportedOperationException();
    }

    @Override
    public String getLogStreamName() {
        throw new UnsupportedOperationException();
    }

    @Override
    public String getFunctionName() {
        throw new UnsupportedOperationException();
    }

    @Override
    public String getFunctionVersion() {
        throw new UnsupportedOperationException();
    }

    @Override
    public String getInvokedFunctionArn() {
        throw new UnsupportedOperationException();
    }

    @Override
    public CognitoIdentity getIdentity() {
        throw new UnsupportedOperationException();
    }

    @Override
    public ClientContext getClientContext() {
        throw new UnsupportedOperationException();
    }

    @Override
    public int getRemainingTimeInMillis() {
        throw new UnsupportedOperationException();
    }

    @Override
    public int getMemoryLimitInMB() {
        throw new UnsupportedOperationException();
    }

    @JacocoGenerated
    @Override
    public LambdaLogger getLogger() {
        return logger;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy