Tag Archives: Testing

Spring Test Framework CoC suggestion

Let’s say you’re using JUnit 4 and the Spring Testing classes (the 2.5+ versions) for your unit tests. You can specify parameters as shown in the TransactionConfiguration annotation as shown in this example. But you can also get away with leaving them out in a nod to the uberhip Convention Over Configuration gods as shown […]

Posted in Spring Framework, Testing | Also tagged , | 1 Response

Spring and Transactions

I’ve been taking a legacy codebase, putting testing in place and refactoring. For DB access I retrofitted the persistence classes to be injected via Spring with a DataSource instead of looking them up via JNDI. IN my Spring context I defined a PlatformTransactionManager. 1 2 3 4 5 6 7 8 9 10 <bean id="dataSource" […]

Posted in DB, Spring Framework, Testing | Also tagged | Leave a comment