| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.rendering.wikimodel.test; |
| 21 |
|
|
| 22 |
|
import java.util.List; |
| 23 |
|
|
| 24 |
|
import org.xwiki.rendering.wikimodel.IWemConstants; |
| 25 |
|
import org.xwiki.rendering.wikimodel.WikiFormat; |
| 26 |
|
import org.xwiki.rendering.wikimodel.WikiStyle; |
| 27 |
|
|
| 28 |
|
import junit.framework.TestCase; |
| 29 |
|
|
| 30 |
|
|
| 31 |
|
@version |
| 32 |
|
@since |
| 33 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 1 |
Complexity Density: 0.1 |
|
| 34 |
|
public class WikiFormatTest extends TestCase |
| 35 |
|
{ |
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 1 |
Complexity Density: 0.1 |
1PASS
|
|
| 36 |
1 |
public void testOrder()... |
| 37 |
|
{ |
| 38 |
1 |
WikiFormat format = new WikiFormat(IWemConstants.STRONG); |
| 39 |
1 |
format = format.addStyle(IWemConstants.EM); |
| 40 |
|
|
| 41 |
1 |
List<WikiStyle> styles = format.getStyles(); |
| 42 |
1 |
assertEquals(IWemConstants.STRONG, styles.get(0)); |
| 43 |
1 |
assertEquals(IWemConstants.EM, styles.get(1)); |
| 44 |
|
|
| 45 |
1 |
format = new WikiFormat(IWemConstants.EM); |
| 46 |
1 |
format = format.addStyle(IWemConstants.STRONG); |
| 47 |
|
|
| 48 |
1 |
styles = format.getStyles(); |
| 49 |
1 |
assertEquals(IWemConstants.EM, styles.get(0)); |
| 50 |
1 |
assertEquals(IWemConstants.STRONG, styles.get(1)); |
| 51 |
|
} |
| 52 |
|
} |