001: // StrutsTestCase - a JUnit extension for testing Struts actions
002: // within the context of the ActionServlet.
003: // Copyright (C) 2002 Deryl Seale
004: //
005: // This library is free software; you can redistribute it and/or
006: // modify it under the terms of the Apache Software License as
007: // published by the Apache Software Foundation; either version 1.1
008: // of the License, or (at your option) any later version.
009: //
010: // This library is distributed in the hope that it will be useful,
011: // but WITHOUT ANY WARRANTY; without even the implied warranty of
012: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013: // Apache Software Foundation Licens for more details.
014: //
015: // You may view the full text here: http://www.apache.org/LICENSE.txt
016:
017: package servletunit;
018:
019: import javax.servlet.FilterConfig;
020: import javax.servlet.ServletContext;
021: import java.util.Enumeration;
022:
023: // StrutsTestCase - a JUnit extension for testing Struts actions
024: // within the context of the ActionServlet.
025: // Copyright (C) 2002 Deryl Seale
026: //
027: // This library is free software; you can redistribute it and/or
028: // modify it under the terms of the Apache Software License as
029: // published by the Apache Software Foundation; either version 1.1
030: // of the License, or (at your option) any later version.
031: //
032: // This library is distributed in the hope that it will be useful,
033: // but WITHOUT ANY WARRANTY; without even the implied warranty of
034: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
035: // Apache Software Foundation Licens for more details.
036: //
037: // You may view the full text here: http://www.apache.org/LICENSE.txt
038:
039: public class FilterConfigSimulator implements FilterConfig {
040:
041: private ServletContext context = null;
042:
043: /**
044: * Constructor for the FilterConfigSimulator object
045: *
046: * @param context The ServletContext to be returned by getServletContext
047: */
048: public FilterConfigSimulator(ServletContext context) {
049: this .context = context;
050: }
051:
052: /**
053: * Gets the filterName attribute of the FilterConfigSimulator object
054: *
055: * currently not supported
056: *
057: * @return The filterName value
058: */
059: public String getFilterName() {
060:
061: throw new java.lang.UnsupportedOperationException(
062: "Method getFilterName() not yet implemented.");
063: }
064:
065: /**
066: * Gets the initParameter attribute of the FilterConfigSimulator object
067: *
068: * currently not supported
069: *
070: * @param parm1 Description of the Parameter
071: * @return The initParameter value
072: */
073: public String getInitParameter(String parm1) {
074:
075: throw new java.lang.UnsupportedOperationException(
076: "Method getInitParameter() not yet implemented.");
077: }
078:
079: /**
080: * Gets the initParameterNames attribute of the FilterConfigSimulator
081: * object
082: *
083: * currently not supported
084: *
085: * @return The initParameterNames value
086: */
087: public Enumeration getInitParameterNames() {
088:
089: throw new java.lang.UnsupportedOperationException(
090: "Method getInitParameterNames() not yet implemented.");
091: }
092:
093: /**
094: * Gets the servletContext attribute of the FilterConfigSimulator object
095: *
096: * @return The servletContext value
097: */
098: public ServletContext getServletContext() {
099: return context;
100: }
101: }
|