org.fakeservlet.FakeServletConfig Maven / Gradle / Ivy
package org.fakeservlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import java.util.Enumeration;
public class FakeServletConfig implements ServletConfig {
private final FakeServletContext context = new FakeServletContext();
@Override
public ServletContext getServletContext() {
return context;
}
@Override
public String getServletName() {
return null;
}
@Override
public String getInitParameter(String name) {
return context.getInitParameter(name);
}
@Override
public Enumeration getInitParameterNames() {
return context.getInitParameterNames();
}
}