Brilliant, I suppose that " you can have struts.xml in test/resources
with struts.objectFactory = struts" will solve my issue.
Thank you very much.
Pozdrawiam/Best regards,
Damian Błażejewski
dblazejewski.com
2013/11/28 Lukasz Lenart
> Ok, I get it what do you want ;-)
>
> Take a look on
Ok, I get it what do you want ;-)
Take a look on StrutsSpringObjectFactory, you can try to cheat it by
defining ApplicationContext in ServletContext:
servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
mockWebAppContext);
or you can have struts.xml in test/re
Lukasz,
Mockito is what I am going to use.
But how to deal with those Spring dependencies in the action?
As I said before, when I extend StrutsJUnit4TestCase I get the following
error:
"Looks like the Spring listener was not configured for your web app! "
On the other hand, extending StrutsSpringJ
Yes, use mocks -> Mockito
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
2013/11/28 Damian Blazejewski :
> I don't want to extend StrutsSpringJUnit4TestCase as it enforces me to
> provide all Spring dependencies required by the action itself.
> Although the Struts Action I want to
I don't want to extend StrutsSpringJUnit4TestCase as it enforces me to
provide all Spring dependencies required by the action itself.
Although the Struts Action I want to test is dependent only on two Spring
beans, those beans have a lot of other dependencies and so on.
What I would like to do is m
2013/11/26 Damian Blazejewski :
> I have managed to sort it out. My project has two maven modules and one
> parent pom common for those modules.
> Tests are located in on of the submodules.
> As turns out, when I add servlet-api and jsp-api dependencies to the parent
> pom, the error is present.
>
I have managed to sort it out. My project has two maven modules and one
parent pom common for those modules.
Tests are located in on of the submodules.
As turns out, when I add servlet-api and jsp-api dependencies to the parent
pom, the error is present.
However, when I move those two dependencies
What Struts version do you use? And can you post source of the test?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
2013/11/24 Damian Blazejewski :
> Hello,
>
> I have a problem executing Struts 2 action test case.
> I get the following error:
>
>
> *Absent Code attribute in metho
Hello,
I have a problem executing Struts 2 action test case.
I get the following error:
*Absent Code attribute in method that is not native or abstract in class
file javax/servlet/jsp/PageContext *
I have no clue what can be wrong.
Thank you in advance for your help.
Here are my dependencies:
9 matches
Mail list logo