Mass removal of all Tabs (Style Warnings)
[aaf/authz.git] / auth / auth-core / src / test / java / org / onap / aaf / auth / rserv / test / JU_Version.java
1 /*******************************************************************************
2  * ============LICENSE_START====================================================
3  * * org.onap.aaf
4  * * ===========================================================================
5  * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * * ===========================================================================
7  * * Licensed under the Apache License, Version 2.0 (the "License");
8  * * you may not use this file except in compliance with the License.
9  * * You may obtain a copy of the License at
10  * * 
11  *  *      http://www.apache.org/licenses/LICENSE-2.0
12  * * 
13  *  * Unless required by applicable law or agreed to in writing, software
14  * * distributed under the License is distributed on an "AS IS" BASIS,
15  * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * * See the License for the specific language governing permissions and
17  * * limitations under the License.
18  * * ============LICENSE_END====================================================
19  * *
20  * *
21  ******************************************************************************/
22 package org.onap.aaf.auth.rserv.test;
23
24 import static org.junit.Assert.*;
25
26 import org.junit.Assert;
27 import org.junit.Before;
28 import org.junit.Test;
29 import org.junit.runner.RunWith;
30 import org.mockito.Matchers;
31 import org.mockito.Mock;
32 import org.onap.aaf.auth.rserv.Version;
33 import org.powermock.modules.junit4.PowerMockRunner;
34
35 @RunWith(PowerMockRunner.class)
36 public class JU_Version {
37     Version version;
38     Version versionTest;
39
40     
41     @Before
42     public void setUp(){
43         version = new Version("first\\.123");
44         versionTest = new Version("first\\.124");
45     }
46
47     @Test
48     public void testEquals(){        
49         version.equals(versionTest);
50         versionTest.equals(version);
51         versionTest = new Version("fail\\.124");
52         version.equals(versionTest);
53         version.equals("This is not an object of version");
54         versionTest = new Version("NoVersion\\.number");
55         version.equals(versionTest);
56         
57         
58     }
59     
60     @Test
61     public void testToString(){
62         String strVal = version.toString();
63         assertNotNull(strVal);
64     }
65     
66     @Test
67     public void testHashCode() {
68         Assert.assertNotNull(version.hashCode());
69     }
70 }