1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.doc; |
21 |
|
|
22 |
|
import org.junit.Test; |
23 |
|
|
24 |
|
import org.junit.Assert; |
25 |
|
|
26 |
|
|
27 |
|
@link |
28 |
|
|
29 |
|
@version |
30 |
|
@since |
31 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 4 |
Complexity Density: 0.5 |
|
32 |
|
public class AttachmentDiffTest |
33 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
34 |
1 |
@Test... |
35 |
|
public void toStringWhenVersionsNotNull() |
36 |
|
{ |
37 |
1 |
AttachmentDiff diff = new AttachmentDiff("filename", "1.1", "1.2"); |
38 |
1 |
Assert.assertEquals("filename: 1.1 \u21E8 1.2", diff.toString()); |
39 |
|
} |
40 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
41 |
1 |
@Test... |
42 |
|
public void toStringWhenNoOriginalVersion() |
43 |
|
{ |
44 |
1 |
AttachmentDiff diff = new AttachmentDiff("filename", null, "1.1"); |
45 |
1 |
Assert.assertEquals("filename: () \u21E8 1.1", diff.toString()); |
46 |
|
} |
47 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
48 |
1 |
@Test... |
49 |
|
public void toStringWhenNoNewVersion() |
50 |
|
{ |
51 |
1 |
AttachmentDiff diff = new AttachmentDiff("filename", "1.1", null); |
52 |
1 |
Assert.assertEquals("filename: 1.1 \u21E8 ()", diff.toString()); |
53 |
|
} |
54 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
1PASS
|
|
55 |
1 |
@Test... |
56 |
|
public void toStringWhenNoVersions() |
57 |
|
{ |
58 |
1 |
AttachmentDiff diff = new AttachmentDiff("filename", null, null); |
59 |
1 |
Assert.assertEquals("filename: () \u21E8 ()", diff.toString()); |
60 |
|
} |
61 |
|
} |