/** * Test the search of all entities Class_1_01_BI_END.<br> * * <ul> * <li>Step 1 : Create many entities * <li>Step 2 : Search all entities and verify the entities created are found * </ul> * * @throws DaoException if an unexpected DAO exception occurs. */ public final void testFindAllClass101BIENDs() throws DaoException { // Verify number of element before testing int before = class101BIENDDao.findAllClass101BIENDs().size(); Assert.assertTrue("FindAll must return at least 0", before >= 0); // Add two elements Class101BIEND class101BIEND1 = getClass101BIENDExample(); class101BIENDDao.createClass101BIEND(class101BIEND1); Class101BIEND class101BIEND2 = getClass101BIENDExample(); class101BIENDDao.createClass101BIEND(class101BIEND2); // Verify result int after = class101BIENDDao.findAllClass101BIENDs().size(); Assert.assertEquals("FindAll don't find the good number of elements", 2, after - before); }
/** * Tests the creation of the entity Class_1_01_BI_END.<br> * * <ul> * <li>Step 1 : Create an entity * <li>Step 2 : Search the entity and verify it exists * </ul> * * @throws DaoException if an unexpected DAO exception occurs. */ public final void testCreateClass101BIEND() throws DaoException { // fill attributes with example values Class101BIEND class101BIEND = getClass101BIENDExample(); // Execute the tested code class101BIENDDao.createClass101BIEND(class101BIEND); // Verify result boolean found = false; for (Class101BIEND currentClass101BIEND : class101BIENDDao.findAllClass101BIENDs()) { if (currentClass101BIEND.equals(class101BIEND)) { found = true; } } Assert.assertTrue("Class_1_01_BI_END not created", found); }
/** * Test the modification of an entity Class_1_01_BI_END.<br> * * <ul> * <li>Step 1 : Create an entity * <li>Step 2 : Modify the entity * <li>Step 3 : Search the entity and verify the modified values * </ul> * * @throws DaoException if an unexpected DAO exception occurs. */ public final void testUpdateClass101BIEND() throws DaoException { // Initialized the test Class101BIEND class101BIEND = getClass101BIENDExample(); class101BIENDDao.createClass101BIEND(class101BIEND); // Execute the tested code class101BIENDDao.updateClass101BIEND(class101BIEND); // Verify result boolean found = false; for (Class101BIEND currentClass101BIEND : class101BIENDDao.findAllClass101BIENDs()) { if (currentClass101BIEND.equals(class101BIEND)) { found = true; } } Assert.assertTrue("Class101BIEND not found", found); }