use of org.eclipse.mylyn.wikitext.html.internal.BlockStrategies in project mylyn.docs by eclipse.
the class BlockStrategiesTest method alternatives.
@Test
public void alternatives() {
BlockStrategies strategies = new BlockStrategies(Sets.newHashSet(BlockType.PARAGRAPH));
assertTrue(strategies.getStrategy(BlockType.CODE, new Attributes()) instanceof SubstitutionBlockStrategy);
}
use of org.eclipse.mylyn.wikitext.html.internal.BlockStrategies in project mylyn.docs by eclipse.
the class BlockStrategiesTest method definitionList.
@Test
public void definitionList() {
BlockStrategies strategies = new BlockStrategies(Sets.newHashSet(BlockType.DEFINITION_LIST));
assertSupported(strategies, BlockType.DEFINITION_LIST);
assertSupported(strategies, BlockType.DEFINITION_ITEM);
assertSupported(strategies, BlockType.DEFINITION_TERM);
}
use of org.eclipse.mylyn.wikitext.html.internal.BlockStrategies in project mylyn.docs by eclipse.
the class BlockStrategiesTest method table.
@Test
public void table() {
BlockStrategies strategies = new BlockStrategies(Sets.newHashSet(BlockType.TABLE));
assertSupported(strategies, BlockType.TABLE);
assertSupported(strategies, BlockType.TABLE_ROW);
assertSupported(strategies, BlockType.TABLE_CELL_HEADER);
assertSupported(strategies, BlockType.TABLE_CELL_NORMAL);
}
use of org.eclipse.mylyn.wikitext.html.internal.BlockStrategies in project mylyn.docs by eclipse.
the class BlockStrategiesTest method fallBackToNoOp.
@Test
public void fallBackToNoOp() {
BlockStrategies strategies = new BlockStrategies(Sets.newHashSet(BlockType.PARAGRAPH));
List<BlockType> unsupportedBlockTypes = ImmutableList.of(BlockType.TABLE, BlockType.BULLETED_LIST, BlockType.NUMERIC_LIST, BlockType.DEFINITION_LIST);
for (BlockType blockType : unsupportedBlockTypes) {
BlockStrategy strategy = strategies.getStrategy(blockType, new Attributes());
assertNotNull(strategy);
assertTrue(NoOpBlockStrategy.class.equals(strategy.getClass()));
}
}
Aggregations