
io.tracee.contextlogger.integrationtest.TestContextDataWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tracee-context-logger-integration-test Show documentation
Show all versions of tracee-context-logger-integration-test Show documentation
Please refer to https://github.com/holisticon/tracee.
The newest version!
package io.tracee.contextlogger.integrationtest;
import io.tracee.contextlogger.api.TraceeContextProvider;
import io.tracee.contextlogger.api.TraceeContextProviderMethod;
import io.tracee.contextlogger.api.WrappedContextData;
/**
* Test wrapper class that wraps type {@link io.tracee.contextlogger.integrationtest.WrappedTestContextData}.
*/
@TraceeContextProvider(displayName = "testdata", order = 50)
public class TestContextDataWrapper implements WrappedContextData {
public static final String PROPERTY_NAME = "WrappedTestContextData.testOutputPropertyName";
private WrappedTestContextData contextData;
public TestContextDataWrapper() {
}
public TestContextDataWrapper(final WrappedTestContextData contextData) {
this.contextData = contextData;
}
@Override
public void setContextData(Object instance) throws ClassCastException {
this.contextData = (WrappedTestContextData)instance;
}
@Override
public Class getWrappedType() {
return WrappedTestContextData.class;
}
@SuppressWarnings("unused")
@TraceeContextProviderMethod(displayName = "testoutput", propertyName = TestContextDataWrapper.PROPERTY_NAME, order = 10)
public String getOutput() {
return contextData != null ? contextData.getOutput() : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy