Guest User

Untitled

a guest
Jan 19th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @Test
  2. public void testCreate(){
  3. Produkt test = new Produkt(20, "junit", "junitk", false, 900.67, true, true);
  4. handler.createProdukt(test);
  5. }
  6.  
  7. @Before
  8. public void setUp() throws SQLException, ClassNotFoundException{
  9. try {
  10. this.shandler = new ServiceHandler();
  11. this.setServiceHandler(shandler);
  12. manager.getConnection();
  13. manager.getConnection().setAutoCommit(false);
  14. } catch (SQLException ex) {
  15. System.err.println("ERROR:");
  16. ex.printStackTrace();
  17. }
  18.  
  19. }
  20.  
  21. @After
  22. public void tearDown() throws SQLException, ClassNotFoundException{
  23. manager.getConnection().rollback();
  24. manager.closeConnection();
  25. }
Add Comment
Please, Sign In to add comment