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.domain;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.openecomp.portalapp.portal.domain.PersUserWidgetSelection;
public class PersUserWidgetSelectionTest {
public PersUserWidgetSelection mockPersUserWidgetSelection(){
PersUserWidgetSelection persUserWidgetSelection = new PersUserWidgetSelection();
persUserWidgetSelection.setUserId((long)1);
persUserWidgetSelection.setWidgetId((long)1);
persUserWidgetSelection.setStatusCode("test");
return persUserWidgetSelection;
}
@Test
public void persUserWidgetSelectionTest(){
PersUserWidgetSelection persUserWidgetSelection = mockPersUserWidgetSelection();
PersUserWidgetSelection persUserWidgetSelection1 = new PersUserWidgetSelection((long)1, (long)1, (long)1, "test");
assertEquals(persUserWidgetSelection.getUserId(), new Long(1));
assertEquals(persUserWidgetSelection.getWidgetId(), new Long(1));
assertEquals(persUserWidgetSelection.getStatusCode(), "test");
assertEquals(persUserWidgetSelection1, new PersUserWidgetSelection((long)1, (long)1, (long)1, "test"));
assertTrue(persUserWidgetSelection1.equals(new PersUserWidgetSelection((long)1, (long)1, (long)1,"test")));
assertEquals(persUserWidgetSelection.hashCode(), persUserWidgetSelection1.hashCode());
}
}
|