All pastes #511509 Raw Edit

Miscellany

public java v1 · immutable
#511509 ·published 2007-05-26 14:03 UTC
rendered paste body
	protected void setUp() throws Exception {		ResetDB.leereDatenbank();		session = HibernateUtil.getSessionFactory().getCurrentSession();		session.beginTransaction();	}		protected void tearDown() throws Exception {		ResetDB.leereDatenbank();	}	public void testCreateAndStoreFach17() throws FachAlreadyExistsException {		FachManager fachManager = new FachManager();				try {			fachManager.createAndStoreFach(null, "Felix");			session.getTransaction().commit();			fail();		} catch (IllegalArgumentException e) {			session.getTransaction().rollback();		}						session = HibernateUtil.getSessionFactory().getCurrentSession();		session.beginTransaction();		fachManager.createAndStoreFach("deutsch", "sabbeln");				session.getTransaction().commit();	}