1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.model.common;
|
11
|
|
12
|
import static org.junit.Assert.assertEquals;
|
13
|
import static org.junit.Assert.assertNotNull;
|
14
|
|
15
|
import org.junit.Before;
|
16
|
import org.junit.Test;
|
17
|
|
18
|
/**
|
19
|
* @author n.hoffmann
|
20
|
* @since Mar 9, 2011
|
21
|
*/
|
22
|
public class GrantedAuthorityImplTest {
|
23
|
|
24
|
private GrantedAuthorityImpl grantedAuthority;
|
25
|
private String authority;
|
26
|
|
27
|
@Before
|
28
|
public void setUp() throws Exception {
|
29
|
grantedAuthority = GrantedAuthorityImpl.NewInstance(null);
|
30
|
authority = "";
|
31
|
}
|
32
|
|
33
|
@Test
|
34
|
public final void testNewInstance() {
|
35
|
assertNotNull(grantedAuthority);
|
36
|
}
|
37
|
|
38
|
@Test
|
39
|
public final void testGetAuthority() {
|
40
|
grantedAuthority.setAuthority(authority);
|
41
|
|
42
|
assertEquals(authority, grantedAuthority.getAuthority());
|
43
|
}
|
44
|
|
45
|
@Test
|
46
|
public final void testCompareTo() {
|
47
|
// not implemented yet
|
48
|
}
|
49
|
|
50
|
}
|