2011-02-21 15:48:54 +00:00
|
|
|
From 29a4b2d7cca447279d91cd7ff9a2ed13436f82a7 Mon Sep 17 00:00:00 2001
|
2010-10-14 08:27:45 +00:00
|
|
|
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
2011-02-21 15:48:54 +00:00
|
|
|
Date: Mon, 21 Feb 2011 15:56:54 +0100
|
|
|
|
Subject: [PATCH 2/3] Fix servlet25 testcase
|
2010-10-14 08:27:45 +00:00
|
|
|
|
|
|
|
---
|
2011-02-21 15:48:54 +00:00
|
|
|
.../velocity/test/VelocityServletTestCase.java | 21 +++++++++++++++++++-
|
|
|
|
1 files changed, 20 insertions(+), 1 deletions(-)
|
2010-10-14 08:27:45 +00:00
|
|
|
|
|
|
|
diff --git a/src/test/org/apache/velocity/test/VelocityServletTestCase.java b/src/test/org/apache/velocity/test/VelocityServletTestCase.java
|
2011-02-21 15:48:54 +00:00
|
|
|
index 700a453..ac0ab5c 100644
|
2010-10-14 08:27:45 +00:00
|
|
|
--- 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";
|
2011-02-21 15:48:54 +00:00
|
|
|
@@ -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;
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
}
|
2010-10-14 08:27:45 +00:00
|
|
|
--
|
2011-02-21 15:48:54 +00:00
|
|
|
1.7.4
|
2010-10-14 08:27:45 +00:00
|
|
|
|