summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPRoleTest.java
blob: 05453bfaf2313926ec85f51983125cebb45d4258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package org.openecomp.portalapp.portal.test.domain;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.openecomp.portalapp.portal.domain.EPRole;

public class EPRoleTest {

	public EPRole mockEPRole(){
		EPRole epRole = new EPRole();
		
		epRole.setName("test");
		epRole.setActive(false);
		epRole.setPriority(1);
		epRole.setAppId((long)1);
		epRole.setAppRoleId((long)1);
		   
		return epRole;
	}
	
	@Test
	public void epRoleTest(){
		EPRole epRole = mockEPRole();
		
		assertEquals(epRole.getName(), "test");
		assertEquals(epRole.getActive(), false);
		assertEquals(epRole.getPriority().toString(),"1");
		assertEquals(epRole.getAppId(), new Long(1));
		assertEquals(epRole.getAppRoleId(), new Long(1));
		
		assertEquals(epRole.toString(), "[Id = null, name = test]");

		
	}
}