@@ -0,0 +1,3407 @@
+package nl.fontys.sofa.limo.orientdb.dao;%0A%0Aimport java.util.List;%0Aimport nl.fontys.sofa.limo.api.dao.CostCategoryDAO;%0Aimport nl.fontys.sofa.limo.domain.category.CostCategory;%0Aimport nl.fontys.sofa.limo.orientdb.database.OrientDBDAOFactory;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.netbeans.junit.NbTestCase;%0A%0Apublic class OrientDBCostCategoryDAOTest extends NbTestCase %7B%0A%0A    private CostCategoryDAO costCategoryDAO;%0A%0A    public OrientDBCostCategoryDAOTest(String testCase) %7B%0A        super(testCase);%0A    %7D%0A%0A    @Before%0A    @Override%0A    public void setUp() %7B%0A        OrientDBDAOFactory orientDBDAOFactory = new OrientDBDAOFactory();%0A        costCategoryDAO = orientDBDAOFactory.getCostCategoryDAO();%0A    %7D%0A%0A    @After%0A    @Override%0A    public void tearDown() %7B%0A        costCategoryDAO = null;%0A    %7D%0A%0A    /**%0A     * Test of findAll method, of class OrientDBCostCategoryDAO.%0A     */%0A    @Test%0A    public void testFindAll() %7B%0A        List%3CCostCategory%3E costCategories = costCategoryDAO.findAll();%0A        assertTrue(costCategories.isEmpty());%0A    %7D%0A%0A    /**%0A     * Test of findById method, of class OrientDBCostCategoryDAO.%0A     */%0A    @Test%0A    public void testFindById() %7B%0A        CostCategory costCategory = costCategoryDAO.findById(%22%22);%0A        assertNull(costCategory);%0A        costCategory = costCategoryDAO.findById(%2238129803980%22);%0A        assertNull(costCategory);%0A    %7D%0A%0A    /**%0A     * Test of insert method, of class OrientDBCostCategoryDAO.%0A     */%0A    @Test%0A    public void testInsert() %7B%0A        CostCategory costCategory = new CostCategory(%22taxes%22);%0A        costCategoryDAO.insert(costCategory);%0A        List%3CCostCategory%3E costCategories = costCategoryDAO.findAll();%0A        assertEquals(1, costCategories.size());%0A        CostCategory foundCostCategory = costCategoryDAO.findById(%221%22);%0A        assertEquals(costCategory, foundCostCategory);%0A    %7D%0A%0A    /**%0A     * Test of update method, of class OrientDBCostCategoryDAO.%0A     */%0A    @Test%0A    public void testUpdate() %7B%0A        String newCategoryName = %22international taxes%22;%0A        CostCategory costCategory = new CostCategory(%22taxes%22);%0A        boolean updateSuccess = costCategoryDAO.update(costCategory);%0A        assertFalse(updateSuccess);%0A        costCategoryDAO.insert(costCategory);%0A        costCategory = costCategoryDAO.findById(%221%22);%0A        costCategory.setIdentifier(newCategoryName);%0A        updateSuccess = costCategoryDAO.update(costCategory);%0A        assertTrue(updateSuccess);%0A        costCategory = costCategoryDAO.findById(%221%22);%0A        assertEquals(newCategoryName, costCategory.getIdentifier());%0A    %7D%0A%0A    /**%0A     * Test of delete method, of class OrientDBCostCategoryDAO.%0A     */%0A    @Test%0A    public void testDelete() %7B%0A        boolean deleteSuccess = costCategoryDAO.delete(%22%22);%0A        assertFalse(deleteSuccess);%0A        deleteSuccess = costCategoryDAO.delete(%22798319203%22);%0A        assertFalse(deleteSuccess);%0A        CostCategory costCategory = new CostCategory(%22taxes%22);%0A        costCategoryDAO.insert(costCategory);%0A        deleteSuccess = costCategoryDAO.delete(%221%22);%0A        assertTrue(deleteSuccess);%0A    %7D%0A%0A    /**%0A     * Test of getTableName method, of class OrientDBCostCategoryDAO.%0A     */%0A    @Test%0A    public void testGetTableName() %7B%0A        assertNotNull(costCategoryDAO.getTableName());%0A        assertFalse(costCategoryDAO.getTableName().isEmpty());%0A    %7D%0A%0A%7D%0A

add orientdbcostcategory test