I managed to make a similar workaround to enable reopening of session in unit
tests using your approach. I'm using wicket 6.7, hibernate 4 and spring
3.2.2.
please let me know if you have any problem in this configuration
Thanks a lot
Leon Nieuwoudt wrote
Hi all,
After about 5 minutes of omfg
Yes this works when running the program in the Application Server
environment.
For JUnit testing (outside of the AS), I ran into this problem.
Is there maybe a better way to maybe wrap the OSIV Filter around Unit Tests?
On Tue, Feb 16, 2010 at 9:07 AM, Wilhelmsen Tor Iver
all you have to do is start a transaction before each unit test and
roll it back after. spring has base unit tests and test runners that
do this for you...
-igor
On Tue, Feb 16, 2010 at 12:13 AM, Leon Nieuwoudt
leon.nieuwo...@gmail.com wrote:
Yes this works when running the program in the
Hi Igor
Glad to hear there's another way.
I'm already using the Spring JUnit runner, like this:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class UserTest extends . {
@Test
public void testCRUD() {
// Code...
}
}
This what I tried:
* Adding
Just an update, the quick hack failed completely when testing on an XP
system, but it worked perfectly on Ubuntu.
Any links or example on getting Spring/Hibernate/WicketTester/JUnit4 to work
will be appreciated. lmgtfy will also suffice ;)
On Tue, Feb 16, 2010 at 9:57 AM, Leon Nieuwoudt