afed731bf0b2af22d18e9ff058a1466d9ca77241
[aaf/cadi.git] / core / src / test / java / org / onap / aaf / cadi / util / JU_NetMask.java
1 /*******************************************************************************\r
2  * * org.onap.aaf\r
3  * * ===========================================================================\r
4  * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
5  * * ===========================================================================\r
6  * * Licensed under the Apache License, Version 2.0 (the "License");\r
7  * * you may not use this file except in compliance with the License.\r
8  * * You may obtain a copy of the License at\r
9  * * \r
10  *  *      http://www.apache.org/licenses/LICENSE-2.0\r
11  * * \r
12  *  * Unless required by applicable law or agreed to in writing, software\r
13  * * distributed under the License is distributed on an "AS IS" BASIS,\r
14  * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15  * * See the License for the specific language governing permissions and\r
16  * * limitations under the License.\r
17  * * ============LICENSE_END====================================================\r
18  * *\r
19  * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
20  * *\r
21  ******************************************************************************/\r
22 package org.onap.aaf.cadi.util;\r
23 \r
24 import static org.junit.Assert.assertEquals;\r
25 \r
26 import org.junit.Test;\r
27 \r
28 public class JU_NetMask {\r
29 \r
30         @Test\r
31         public void deriveTest() {\r
32                 String test = "test";\r
33                 assertEquals(NetMask.derive(test.getBytes()), 0);\r
34         }\r
35 \r
36         @Test\r
37         public void deriveTest2() {\r
38                 String test = "1.2.3.4";\r
39                 assertEquals(NetMask.derive(test.getBytes()), 0);\r
40         }\r
41         \r
42         @Test\r
43         public void deriveTest3() {\r
44                 String test = "1.2.4";\r
45                 assertEquals(NetMask.derive(test.getBytes()), 0);\r
46         }\r
47         \r
48         @Test\r
49         public void deriveTest4() {\r
50                 String test = "1.3.4";\r
51                 assertEquals(NetMask.derive(test.getBytes()), 0);\r
52         }\r
53         \r
54         @Test\r
55         public void deriveTest5() {\r
56                 String test = "2.3.4";\r
57                 assertEquals(NetMask.derive(test.getBytes()), 0);\r
58         }\r
59         \r
60         @Test\r
61         public void deriveTest6() {\r
62                 String test = "3.4";\r
63                 assertEquals(NetMask.derive(test.getBytes()), 0);\r
64         }\r
65 }\r