Revision a784f00f
Added by Katja Luther about 14 years ago
cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/UserDaoHibernateImplTest.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.cdm.persistence.dao.hibernate.common; |
11 | 11 |
|
12 |
import static org.junit.Assert.assertNotNull; |
|
13 | 12 |
import static org.junit.Assert.assertEquals; |
13 |
import static org.junit.Assert.assertNotNull; |
|
14 | 14 |
|
15 | 15 |
import java.lang.reflect.Array; |
16 | 16 |
|
17 | 17 |
import org.junit.Test; |
18 | 18 |
import org.unitils.dbunit.annotation.DataSet; |
19 |
import org.unitils.spring.annotation.SpringApplicationContext; |
|
20 | 19 |
import org.unitils.spring.annotation.SpringBeanByType; |
21 | 20 |
|
22 | 21 |
import eu.etaxonomy.cdm.model.common.User; |
... | ... | |
34 | 33 |
User user = userDao.findUserByUsername("test"); |
35 | 34 |
|
36 | 35 |
assertNotNull("findUserByUsername should return a user", user); |
37 |
assertEquals("the user should have had their authorities loaded",2,Array.getLength(user.getAuthorities()));
|
|
36 |
assertEquals("the user should have had their authorities loaded",2,user.getAuthorities().size());
|
|
38 | 37 |
} |
39 | 38 |
|
40 | 39 |
} |
Also available in: Unified diff
merge cate-development2 branch with trunk