From 7986cbdb0ef13a51c571c03109ce46e633ecba88 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 13 Sep 2010 10:17:04 +0000 Subject: [PATCH] SWF-1386 Make tests independent of (the location of) Spring.js. That allows them to run inside an IDE without relying on the Ant build. --- .../springframework/js/resource/ResourceServletTests.java | 8 ++++---- .../java/org/springframework/js/resource/TestResource1.js | 0 .../java/org/springframework/js/resource/TestResource2.js | 0 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 spring-js/src/test/java/org/springframework/js/resource/TestResource1.js create mode 100644 spring-js/src/test/java/org/springframework/js/resource/TestResource2.js diff --git a/spring-js/src/test/java/org/springframework/js/resource/ResourceServletTests.java b/spring-js/src/test/java/org/springframework/js/resource/ResourceServletTests.java index 7927ffb9..fce7e9a9 100644 --- a/spring-js/src/test/java/org/springframework/js/resource/ResourceServletTests.java +++ b/spring-js/src/test/java/org/springframework/js/resource/ResourceServletTests.java @@ -31,7 +31,7 @@ public class ResourceServletTests extends TestCase { public final void testExecute() throws Exception { - String requestPath = "/spring/Spring.js"; + String requestPath = "/org/springframework/js/resource/TestResource1.js"; request.setPathInfo(requestPath); servlet.doGet(request, response); @@ -41,10 +41,10 @@ public class ResourceServletTests extends TestCase { public final void testExecute_CombinedResources() throws Exception { - String requestPath = "/spring/Spring.js"; + String requestPath = "/org/springframework/js/resource/TestResource1.js"; request.setPathInfo(requestPath); Map params = new HashMap(); - params.put("appended", "/spring/Spring-Dojo.js"); + params.put("appended", "/org/springframework/js/resource/TestResource2.js"); request.setParameters(params); servlet.doGet(request, response); @@ -53,7 +53,7 @@ public class ResourceServletTests extends TestCase { public final void testExecute_CompressedResponse() throws Exception { - String requestPath = "/spring/Spring.js"; + String requestPath = "/org/springframework/js/resource/TestResource1.js"; request.setPathInfo(requestPath); request.addHeader("Accept-Encoding", "gzip"); servlet.doGet(request, response); diff --git a/spring-js/src/test/java/org/springframework/js/resource/TestResource1.js b/spring-js/src/test/java/org/springframework/js/resource/TestResource1.js new file mode 100644 index 00000000..e69de29b diff --git a/spring-js/src/test/java/org/springframework/js/resource/TestResource2.js b/spring-js/src/test/java/org/springframework/js/resource/TestResource2.js new file mode 100644 index 00000000..e69de29b