[SECARSP-149] *server side unit tests
[platform/core/security/suspicious-activity-monitor.git] / server / samserver / src / test / java / com / samsung / samserver / web / rest / service / vm / UIDashboardLogTest.java
1 /*
2  * In Samsung Ukraine R&D Center (SRK under a contract between)
3  * LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
4  * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
5  */
6 package com.samsung.samserver.web.rest.service.vm;
7
8 import org.junit.Assert;
9 import org.junit.Before;
10 import org.junit.Test;
11 import org.mockito.InjectMocks;
12 import org.mockito.Mock;
13 import org.mockito.MockitoAnnotations;
14
15 import java.util.Arrays;
16 import java.util.List;
17
18 import static org.mockito.Mockito.*;
19
20 /**
21  * Test class for the UIDashboardLog.
22  *
23  * @see UIDashboardLog
24  */
25 public class UIDashboardLogTest {
26     @Mock
27     List<String> additional;
28     @InjectMocks
29     UIDashboardLog uIDashboardLog;
30
31     @Before
32     public void setUp() {
33         MockitoAnnotations.initMocks(this);
34     }
35
36     @Test
37     public void testSetLevel() throws Exception {
38         uIDashboardLog.setLevel("level");
39     }
40
41     @Test
42     public void testSetMessage() throws Exception {
43         uIDashboardLog.setMessage("message");
44     }
45
46     @Test
47     public void testSetTimestamp() throws Exception {
48         uIDashboardLog.setTimestamp("timestamp");
49     }
50
51     @Test
52     public void testSetAdditional() throws Exception {
53         uIDashboardLog.setAdditional(Arrays.<String>asList("String"));
54     }
55
56     @Test
57     public void testToString() throws Exception {
58         String result = uIDashboardLog.toString();
59         Assert.assertEquals("UIDashboardLog(level=null, message=null, timestamp=null, additional=additional)", result);
60     }
61 }