|
1 |
| -/* |
2 |
| - * Copyright 2020 hartmann-v. |
3 |
| - * |
4 |
| - * Licensed under the Apache License, Version 2.0 (the "License"); |
5 |
| - * you may not use this file except in compliance with the License. |
6 |
| - * You may obtain a copy of the License at |
7 |
| - * |
8 |
| - * http://www.apache.org/licenses/LICENSE-2.0 |
9 |
| - * |
10 |
| - * Unless required by applicable law or agreed to in writing, software |
11 |
| - * distributed under the License is distributed on an "AS IS" BASIS, |
12 |
| - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 |
| - * See the License for the specific language governing permissions and |
14 |
| - * limitations under the License. |
15 |
| - */ |
16 |
| -package edu.kit.datamanager.mappingservice.domain; |
17 |
| - |
18 |
| -import org.junit.jupiter.api.Test; |
19 |
| - |
20 |
| -import static org.junit.jupiter.api.Assertions.assertEquals; |
21 |
| - |
22 |
| -/** |
23 |
| - * @author hartmann-v |
24 |
| - */ |
25 |
| -public class CompositeKeyTest { |
26 |
| - /** |
27 |
| - * Test of hashCode method, of class CompositeKey. |
28 |
| - */ |
29 |
| - @Test |
30 |
| - public void testHashCode() { |
31 |
| - System.out.println("hashCode"); |
32 |
| - CompositeKey instance = new CompositeKey(); |
33 |
| - int expResult = 10443; |
34 |
| - int result = instance.hashCode(); |
35 |
| - assertEquals(expResult, result); |
36 |
| - } |
37 |
| - |
38 |
| - /** |
39 |
| - * Test of equals method, of class CompositeKey. |
40 |
| - */ |
41 |
| - @Test |
42 |
| - public void testEquals() { |
43 |
| - System.out.println("equals"); |
44 |
| - Object obj = null; |
45 |
| - CompositeKey instance = new CompositeKey(); |
46 |
| - boolean expResult = false; |
47 |
| - boolean result = instance.equals(obj); |
48 |
| - assertEquals(expResult, result); |
49 |
| - obj = new Object(); |
50 |
| - result = instance.equals(obj); |
51 |
| - assertEquals(expResult, result); |
52 |
| - CompositeKey comp2 = new CompositeKey(); |
53 |
| - comp2.mappingId = "map"; |
54 |
| - result = instance.equals(comp2); |
55 |
| - assertEquals(expResult, result); |
56 |
| - comp2.mappingId = null; |
57 |
| - comp2.mappingType = "type"; |
58 |
| - result = instance.equals(comp2); |
59 |
| - assertEquals(expResult, result); |
60 |
| - comp2.mappingId = "map"; |
61 |
| - comp2.mappingType = "type"; |
62 |
| - result = instance.equals(comp2); |
63 |
| - assertEquals(expResult, result); |
64 |
| - expResult = true; |
65 |
| - instance.mappingId = "map"; |
66 |
| - instance.mappingType = "type"; |
67 |
| - result = instance.equals(comp2); |
68 |
| - assertEquals(expResult, result); |
69 |
| - comp2 = instance; |
70 |
| - result = instance.equals(comp2); |
71 |
| - assertEquals(expResult, result); |
72 |
| - } |
73 |
| - |
74 |
| -} |
| 1 | +///* |
| 2 | +// * Copyright 2020 hartmann-v. |
| 3 | +// * |
| 4 | +// * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +// * you may not use this file except in compliance with the License. |
| 6 | +// * You may obtain a copy of the License at |
| 7 | +// * |
| 8 | +// * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +// * |
| 10 | +// * Unless required by applicable law or agreed to in writing, software |
| 11 | +// * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +// * See the License for the specific language governing permissions and |
| 14 | +// * limitations under the License. |
| 15 | +// */ |
| 16 | +//package edu.kit.datamanager.mappingservice.domain; |
| 17 | +// |
| 18 | +//import org.junit.jupiter.api.Test; |
| 19 | +// |
| 20 | +//import static org.junit.jupiter.api.Assertions.assertEquals; |
| 21 | +// |
| 22 | +///** |
| 23 | +// * @author hartmann-v |
| 24 | +// */ |
| 25 | +//public class CompositeKeyTest { |
| 26 | +// /** |
| 27 | +// * Test of hashCode method, of class CompositeKey. |
| 28 | +// */ |
| 29 | +// @Test |
| 30 | +// public void testHashCode() { |
| 31 | +// System.out.println("hashCode"); |
| 32 | +// CompositeKey instance = new CompositeKey(); |
| 33 | +// int expResult = 10443; |
| 34 | +// int result = instance.hashCode(); |
| 35 | +// assertEquals(expResult, result); |
| 36 | +// } |
| 37 | +// |
| 38 | +// /** |
| 39 | +// * Test of equals method, of class CompositeKey. |
| 40 | +// */ |
| 41 | +// @Test |
| 42 | +// public void testEquals() { |
| 43 | +// System.out.println("equals"); |
| 44 | +// Object obj = null; |
| 45 | +// CompositeKey instance = new CompositeKey(); |
| 46 | +// boolean expResult = false; |
| 47 | +// boolean result = instance.equals(obj); |
| 48 | +// assertEquals(expResult, result); |
| 49 | +// obj = new Object(); |
| 50 | +// result = instance.equals(obj); |
| 51 | +// assertEquals(expResult, result); |
| 52 | +// CompositeKey comp2 = new CompositeKey(); |
| 53 | +// comp2.mappingId = "map"; |
| 54 | +// result = instance.equals(comp2); |
| 55 | +// assertEquals(expResult, result); |
| 56 | +// comp2.mappingId = null; |
| 57 | +// comp2.mappingType = "type"; |
| 58 | +// result = instance.equals(comp2); |
| 59 | +// assertEquals(expResult, result); |
| 60 | +// comp2.mappingId = "map"; |
| 61 | +// comp2.mappingType = "type"; |
| 62 | +// result = instance.equals(comp2); |
| 63 | +// assertEquals(expResult, result); |
| 64 | +// expResult = true; |
| 65 | +// instance.mappingId = "map"; |
| 66 | +// instance.mappingType = "type"; |
| 67 | +// result = instance.equals(comp2); |
| 68 | +// assertEquals(expResult, result); |
| 69 | +// comp2 = instance; |
| 70 | +// result = instance.equals(comp2); |
| 71 | +// assertEquals(expResult, result); |
| 72 | +// } |
| 73 | +// |
| 74 | +//} |
0 commit comments