Re: Struts 2 Testing Actions

2013-11-27 Thread Damian Blazejewski
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

Re: Struts 2 Testing Actions

2013-11-27 Thread Lukasz Lenart
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

Re: Will I get sideeffects with: OgnlRuntime.setSecurityManager(null);

2013-11-27 Thread Lukasz Lenart
2013/11/27 Fredrik Andersson : > I then guess that you agree with me that if it is possible (if you got > permissions to add permissions) to set the permissions like this instead of > the OgnlRuntime.setSecurityManager(null); > > Do you agree with me? Yes, for sure :-) There was even a dedicat

Re: Struts 2 Testing Actions

2013-11-27 Thread 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 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

RE: Will I get sideeffects with: OgnlRuntime.setSecurityManager(null);

2013-11-27 Thread Fredrik Andersson
Hello! Thanks for all help guys! The permissions worked perfectly, really interesting. I then guess that you agree with me that if it is possible (if you got permissions to add permissions) to set the permissions like this instead of the OgnlRuntime.setSecurityManager(null); Do you agr

Re: Struts 2 Testing Actions

2013-11-27 Thread Lukasz Lenart
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. >