Hi James,
it seems i need more input.
What is the use of Helpers.route?
@Test
public void testTest(){
running(fakeApplication(), new Runnable() {
@Override
public void run() {
Result result = Helpers.route(fakeRequest(Helpers.GET, "/login"));
JPA.em().createNativeQuery("...").getResultList();
assertThat(result).isNotNull();
assertThat(status(result)).isEqualTo(OK);
}
});
}
.
.
.
No EntityManager bound to this thread. Try to annotate your action method with @play.db.jpa.Transactional
any hints? (just migrated to 2.1.0)
- Testing database queries without calling RestAPI
(testing the tiny "units")
by the way, it seems there some changes to unit tests. I cannot step-into code for debugging test code.
- using IDE eclipse. debugging is now fine again (play debug run)
- but debugging test code...(play debug test') NO
thanks,
Mathias
Am Mittwoch, 5. Dezember 2012 01:03:03 UTC+1 schrieb James Roper: