[ 
https://issues.apache.org/jira/browse/WW-3711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156809#comment-13156809
 ] 

Miguel Almeida commented on WW-3711:
------------------------------------

Hey Maurizio,

Replying to your comments:
    * there are many way to achieve what you described before (your is one of 
those and it could be a matter of taste)

Like I said, this is a class I built to base my tests on. If it benefits 
others, that's great. If you don't think it will, no worries.

    * you used Spring SimpleJdbcTemplate, but many users might use 
HibernateTemplate, JPATemplate, or whatever.

I pasted that from AbstractTransactionalJUnit4SpringContextTests, but I see I 
might not even need that, so I believe I can take that part out

    * you used StrutsSpringTestCase which basically is based on Junit3, there 
is a StrutsSpringJUnit4TestCase class which allows to use Spring annotations.
I can't find any info on StrutsSpringJUnit4TestCase in either 
https://cwiki.apache.org/WW/junit-plugin.html, in maven search 
(http://www.jarvana.com/jarvana/search?search_type=class&java_class=StrutsSpringJUnit4TestCase
 ) nor in my project (running 2.2.3). Where is that class in?

                
> StrutsSpringTransactionalTestCase - adding transactional behaviour to 
> StrutsSpringTestCase
> ------------------------------------------------------------------------------------------
>
>                 Key: WW-3711
>                 URL: https://issues.apache.org/jira/browse/WW-3711
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Unit Tests
>    Affects Versions: 2.2.3.1
>            Reporter: Miguel Almeida
>            Priority: Minor
>              Labels: spring, struts2, test-patch
>         Attachments: StrutsSpringTransactionalAbstractTest.java
>
>
> From the mailing list thread:
> I'm using StrutsSpringTestCase for some under-the-skin tests.
> However, I felt the need to set up my database for a test. My tests that need 
> the database extend from AbstractTransactionalJUnit4SpringContextTests, which 
> makes them transactional.
> I therefore created a StrutsSpringTransactionalTestCase that merges the 
> behaviour of both StrutsSpringTestCase and 
> AbstractTransactionalJUnit4SpringContextTests. I currently just copy-pasted 
> the relevant information from AbstractTransactionalJUnit4SpringContextTests.
> I'd like you to take a look at it and comment on whether it makes sense to 
> include this in Struts. If so, feel free to use my contribution.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to