Update AAF Version 1.0.0
[aaf/authz.git] / authz-defOrg / src / test / java / com / osaaf / defOrg / JU_DefaultOrgWarnings.java
1 /*******************************************************************************\r
2  * ============LICENSE_START====================================================\r
3  * * org.onap.aaf\r
4  * * ===========================================================================\r
5  * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
6  * * ===========================================================================\r
7  * * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * * you may not use this file except in compliance with the License.\r
9  * * You may obtain a copy of the License at\r
10  * * \r
11  *  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * * \r
13  *  * Unless required by applicable law or agreed to in writing, software\r
14  * * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * * See the License for the specific language governing permissions and\r
17  * * limitations under the License.\r
18  * * ============LICENSE_END====================================================\r
19  * *\r
20  * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
21  * *\r
22  ******************************************************************************/\r
23 package com.osaaf.defOrg;\r
24 \r
25 import static org.junit.Assert.*;\r
26 \r
27 import org.junit.Before;\r
28 import org.junit.Test;\r
29 import org.junit.runner.RunWith;\r
30 import org.mockito.MockitoAnnotations;\r
31 import org.powermock.api.mockito.PowerMockito;\r
32 import org.powermock.modules.junit4.PowerMockRunner;\r
33 \r
34 @RunWith(PowerMockRunner.class)\r
35 public class JU_DefaultOrgWarnings {\r
36         \r
37         private DefaultOrgWarnings defaultOrgWarningsMock;\r
38         private DefaultOrgWarnings defaultOrgWarnings;\r
39         \r
40         \r
41         @Before\r
42         public void setUp(){\r
43                 MockitoAnnotations.initMocks(this);\r
44                 \r
45                 defaultOrgWarningsMock = PowerMockito.mock(DefaultOrgWarnings.class);\r
46                 \r
47                 defaultOrgWarnings = new DefaultOrgWarnings();\r
48         }\r
49 \r
50         \r
51         @Test\r
52         public void testApprEmailInterval() {\r
53                 \r
54                 assertEquals(259200000, defaultOrgWarnings.apprEmailInterval() );\r
55         }\r
56         \r
57         @Test\r
58         public void testCredEmailInterval() {\r
59                 assertEquals(604800000, defaultOrgWarnings.credEmailInterval());\r
60                 \r
61         }\r
62         \r
63         @Test\r
64         public void testCredExpirationWarning() {\r
65                 assertEquals(2592000000L, defaultOrgWarnings.credExpirationWarning());\r
66         }\r
67         \r
68         @Test\r
69         public void testEmailUrgentWarning() {\r
70                 assertEquals(1209600000L, defaultOrgWarnings.emailUrgentWarning());\r
71         }\r
72         \r
73         @Test\r
74         public void testRoleEmailInterval() {\r
75                 assertEquals(604800000L, defaultOrgWarnings.roleEmailInterval());\r
76         }\r
77         \r
78         @Test\r
79         public void testRoleExpirationWarning() {\r
80                 assertEquals(2592000000L, defaultOrgWarnings.roleExpirationWarning());\r
81         }\r
82 \r
83 }\r