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 | |
---|
1 | package clarin.cmdi.componentregistry.impl.database; |
---|
2 | |
---|
3 | import static clarin.cmdi.componentregistry.impl.database.ComponentRegistryTestDatabase.*; |
---|
4 | import clarin.cmdi.componentregistry.model.AbstractDescription; |
---|
5 | import clarin.cmdi.componentregistry.model.ProfileDescription; |
---|
6 | import clarin.cmdi.componentregistry.rest.RegistryTestHelper; |
---|
7 | |
---|
8 | import org.junit.Before; |
---|
9 | import org.springframework.beans.factory.annotation.Autowired; |
---|
10 | |
---|
11 | /** |
---|
12 | * |
---|
13 | * @author Twan Goosen <twan.goosen@mpi.nl> |
---|
14 | */ |
---|
15 | public 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.