1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.rendering.internal.transformation.macro; |
21 |
|
|
22 |
|
import java.util.Properties; |
23 |
|
|
24 |
|
import org.junit.Rule; |
25 |
|
import org.junit.Test; |
26 |
|
import org.xwiki.configuration.ConfigurationSource; |
27 |
|
import org.xwiki.test.mockito.MockitoComponentMockingRule; |
28 |
|
|
29 |
|
import static org.junit.Assert.*; |
30 |
|
import static org.mockito.Mockito.*; |
31 |
|
|
32 |
|
|
33 |
|
@link |
34 |
|
|
35 |
|
@version |
36 |
|
@since |
37 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.2 |
|
38 |
|
public class XWikiMacroTransformationConfigurationTest |
39 |
|
{ |
40 |
|
@Rule |
41 |
|
public MockitoComponentMockingRule<XWikiMacroTransformationConfiguration> mocker = |
42 |
|
new MockitoComponentMockingRule<>(XWikiMacroTransformationConfiguration.class); |
43 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1PASS
|
|
44 |
1 |
@Test... |
45 |
|
public void getCategories() throws Exception |
46 |
|
{ |
47 |
1 |
ConfigurationSource source = this.mocker.getInstance(ConfigurationSource.class); |
48 |
1 |
when(source.getProperty("rendering.transformation.macro.categories", Properties.class)).thenReturn( |
49 |
|
new Properties()); |
50 |
|
|
51 |
1 |
Properties categories = this.mocker.getComponentUnderTest().getCategories(); |
52 |
1 |
assertNotNull(categories); |
53 |
1 |
assertEquals(0, categories.size()); |
54 |
|
} |
55 |
|
} |