1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.rendering.macro.gallery; |
21 |
|
|
22 |
|
import java.util.Map; |
23 |
|
|
24 |
|
import org.jmock.Expectations; |
25 |
|
import org.jmock.Mockery; |
26 |
|
import org.jmock.integration.junit4.JUnit4Mockery; |
27 |
|
import org.junit.runner.RunWith; |
28 |
|
import org.xwiki.rendering.test.integration.RenderingTestSuite; |
29 |
|
import org.xwiki.skinx.SkinExtension; |
30 |
|
import org.xwiki.test.jmock.MockingComponentManager; |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
@link |
35 |
|
|
36 |
|
@version |
37 |
|
@since |
38 |
|
|
39 |
|
@RunWith(RenderingTestSuite.class) |
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
40 |
|
public class IntegrationTests |
41 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
42 |
3 |
@RenderingTestSuite.Initialized... |
43 |
|
public void initialize(MockingComponentManager componentManager) throws Exception |
44 |
|
{ |
45 |
3 |
Mockery mockery = new JUnit4Mockery(); |
46 |
|
|
47 |
3 |
final SkinExtension jsfx = componentManager.registerMockComponent(mockery, SkinExtension.class, "jsfx", "jsfx"); |
48 |
3 |
final SkinExtension ssfx = componentManager.registerMockComponent(mockery, SkinExtension.class, "ssfx", "ssfx"); |
49 |
|
|
50 |
3 |
mockery.checking(new Expectations() |
51 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
52 |
3 |
{... |
53 |
3 |
allowing(jsfx).use(with(aNonNull(String.class)), with(aNonNull(Map.class))); |
54 |
3 |
allowing(ssfx).use(with(aNonNull(String.class))); |
55 |
|
} |
56 |
|
}); |
57 |
|
} |
58 |
|
} |