source: ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/impl/database/ProfileDescriptionDaoTest.java @ 1701

Last change on this file since 1701 was 1701, checked in by twagoo, 12 years ago

Added comments count to component/profile description model. Retrieved from database by doing a count on the comments table

File size: 1.2 KB
Line 
1package clarin.cmdi.componentregistry.impl.database;
2
3import static clarin.cmdi.componentregistry.impl.database.ComponentRegistryTestDatabase.*;
4import clarin.cmdi.componentregistry.model.AbstractDescription;
5import clarin.cmdi.componentregistry.model.ProfileDescription;
6import clarin.cmdi.componentregistry.rest.RegistryTestHelper;
7
8import org.junit.Before;
9import org.springframework.beans.factory.annotation.Autowired;
10
11/**
12 *
13 * @author Twan Goosen <twan.goosen@mpi.nl>
14 */
15public class ProfileDescriptionDaoTest extends AbstractDescriptionDaoTest {
16
17    @Autowired
18    ProfileDescriptionDao profileDescriptionDao;
19
20    @Before
21    public void init() {
22        resetDatabase(jdbcTemplate);
23        createTableProfileDescription(jdbcTemplate);
24        createTableXmlContent(jdbcTemplate);
25        createTableRegistryUser(jdbcTemplate);
26        createTableComments(jdbcTemplate);
27    }
28
29    @Override
30    protected AbstractDescriptionDao getDao() {
31        return profileDescriptionDao;
32    }
33
34    @Override
35    protected AbstractDescription createNewDescription() {
36        return ProfileDescription.createNewDescription();
37    }
38   
39    @Override
40    protected String getContentString() {
41        return RegistryTestHelper.getProfileTestContentString();
42    }
43
44}
Note: See TracBrowser for help on using the repository browser.