1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.structure; |
22 |
|
|
23 |
|
import static org.testng.Assert.assertEquals; |
24 |
|
import static org.testng.Assert.assertFalse; |
25 |
|
import static org.testng.Assert.assertTrue; |
26 |
|
|
27 |
|
import org.testng.annotations.Test; |
28 |
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 1 |
Complexity Density: 0.08 |
|
29 |
|
public class StructureCommandTest |
30 |
|
{ |
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
4-
|
|
31 |
0 |
@Test(groups = "Functional")... |
32 |
|
public void testEquals() |
33 |
|
{ |
34 |
0 |
StructureCommand sc1 = new StructureCommand("open"); |
35 |
0 |
assertTrue(sc1.equals(sc1)); |
36 |
0 |
assertTrue(sc1.equals(new StructureCommand("open"))); |
37 |
0 |
assertFalse(sc1.equals(null)); |
38 |
0 |
assertFalse(sc1.equals(new StructureCommand("Open"))); |
39 |
0 |
assertFalse(sc1.equals("Open")); |
40 |
|
|
41 |
0 |
StructureCommand sc3 = new StructureCommand("Open", "file", |
42 |
|
"/some/path"); |
43 |
0 |
StructureCommand sc2 = new StructureCommand("Open", "file", |
44 |
|
"/some/path"); |
45 |
0 |
assertFalse(sc1.equals(sc2)); |
46 |
0 |
assertTrue(sc3.equals(sc2)); |
47 |
0 |
assertEquals(sc2.hashCode(), sc3.hashCode()); |
48 |
0 |
assertFalse( |
49 |
|
new StructureCommand("Open file", "/some/path").equals(sc2)); |
50 |
|
} |
51 |
|
} |