You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Maurizio Cucchiara (JIRA)" <ji...@apache.org> on 2011/08/13 20:14:27 UTC
[jira] [Commented] (WW-3669) TestCase for StrutsJUnit4TestCase
[ https://issues.apache.org/jira/browse/WW-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084680#comment-13084680 ]
Maurizio Cucchiara commented on WW-3669:
----------------------------------------
Hi Christian thanks for your precious contribution!!
I have some good news for you:
# in my environment the action invocation returns always SUCCESS.
# Freemarker tries to obtain internationalized version of the template file (this explain your "de" suffix). BTW, for the sake of the curiosity, it comes from [getRealPath method|https://src.springframework.org/svn/spring-framework/trunk/org.springframework.web/src/test/java/org/springframework/mock/web/MockServletContext.java]. I would not take it into consideration.
> TestCase for StrutsJUnit4TestCase
> ---------------------------------
>
> Key: WW-3669
> URL: https://issues.apache.org/jira/browse/WW-3669
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.3
> Reporter: Christian Grobmeier
> Priority: Minor
> Fix For: 2.3
>
> Attachments: patch.txt
>
> Original Estimate: 10m
> Remaining Estimate: 10m
>
> Attached is a patch for StrutsJUnit4TestCase. It is a testcase for the improved testcase implementation ;-)
> Just two notes:
> #1: i have made two todos - for some reason the action does return INPUT instead of SUCCESS. This is for an elder testcase too. Not sure were this comes from
> #2: I have seen a few exceptions (from the other testcases too) which I do not know where it comes from:
> 2011-08-10 13:12:40,363 WARN [MockServletContext.java:298] : Couldn't determine real path of resource class path resource [template_de.ftl]
> java.io.FileNotFoundException: class path resource [template_de.ftl] cannot be resolved to URL because it does not exist
> at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:179)
> at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:48)
> at org.springframework.mock.web.MockServletContext.getRealPath(MockServletContext.java:295)
> at freemarker.cache.WebappTemplateLoader.findTemplateSource(WebappTemplateLoader.java:128)
> at freemarker.cache.MultiTemplateLoader.findTemplateSource(MultiTemplateLoader.java:111)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira