Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. @PersistenceTest
  2. public class MyTestClass extends Arquillian {
  3. @Inject private Dao dao;
  4. @Inject private MyBean myBean;
  5.  
  6. @BeforeMethod
  7. public void cleanDB () {
  8. dao.remove(foo); // Currently throws NPE as dao is not injected.
  9. }
  10.  
  11. @Test
  12. public void someTest () {
  13. // In a Test-method dao is available and calling cleanDB from here also
  14. // works as intended....
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement