velocity/0002-Fix-servlet25-testcase.patch

65 lines
1.9 KiB
Diff
Raw Normal View History

From 29a4b2d7cca447279d91cd7ff9a2ed13436f82a7 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Mon, 21 Feb 2011 15:56:54 +0100
Subject: [PATCH 2/3] Fix servlet25 testcase
---
.../velocity/test/VelocityServletTestCase.java | 21 +++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/src/test/org/apache/velocity/test/VelocityServletTestCase.java b/src/test/org/apache/velocity/test/VelocityServletTestCase.java
index 700a453..ac0ab5c 100644
--- a/src/test/org/apache/velocity/test/VelocityServletTestCase.java
+++ b/src/test/org/apache/velocity/test/VelocityServletTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
import java.io.IOException;
@@ -149,6 +149,11 @@ public class VelocityServletTestCase extends TestCase
return this;
}
+ public String getContextPath()
+ {
+ return "";
+ }
+
public String getServletContextName()
{
return "VelocityTestContext";
@@ -250,6 +255,11 @@ public class VelocityServletTestCase extends TestCase
public void setAttribute(String name, Object value)
{
}
+
+ public Set getResourcePath(String path)
+ {
+ return null;
+ }
}
static class MockHttpServletResponse implements HttpServletResponse
@@ -408,5 +418,14 @@ public class VelocityServletTestCase extends TestCase
public void setStatus(int i , String s)
{
}
+
+ public void setCharacterEncoding(String charset)
+ {
+ }
+
+ public String getContentType()
+ {
+ return null;
+ }
}
}
--
1.7.4