use of org.eclipse.mylyn.wikitext.mediawiki.internal.TemplateProcessor in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateWithSlashes.
public void testBasicTemplateWithSlashes() {
// Bug 468237
Template template = new Template();
template.setName("Temp/Main");
template.setTemplateMarkup("_expanded_");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("one {{Temp/Main}} two");
assertEquals("one _expanded_ two", markup);
}
use of org.eclipse.mylyn.wikitext.mediawiki.internal.TemplateProcessor in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateDidgitInTheName3.
public void testBasicTemplateDidgitInTheName3() {
// Bug 380052
Template template = new Template();
template.setName("foo999bar");
template.setTemplateMarkup("foo-bar");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("foo{{foo999bar}}bar");
assertEquals("foofoo-barbar", markup);
}
use of org.eclipse.mylyn.wikitext.mediawiki.internal.TemplateProcessor in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateQualifiedName.
public void testBasicTemplateQualifiedName() {
Template template = new Template();
template.setName("Test:test");
template.setTemplateMarkup("_expanded_");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("one {{Test:test}} two");
assertEquals("one _expanded_ two", markup);
}
use of org.eclipse.mylyn.wikitext.mediawiki.internal.TemplateProcessor in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateNoParameters.
public void testBasicTemplateNoParameters() {
Template template = new Template();
template.setName("test");
template.setTemplateMarkup("_expanded_");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("one {{test}} two");
assertEquals("one _expanded_ two", markup);
}
use of org.eclipse.mylyn.wikitext.mediawiki.internal.TemplateProcessor in project mylyn.docs by eclipse.
the class TemplateProcessorTest method testBasicTemplateOtherNamespace.
public void testBasicTemplateOtherNamespace() {
// Bug 468237
Template template = new Template();
template.setName("Other:Test");
template.setTemplateMarkup("_expanded_");
markupLanguage.getTemplates().add(template);
TemplateProcessor templateProcessor = new TemplateProcessor(markupLanguage);
String markup = templateProcessor.processTemplates("one {{Other:Test}} two");
assertEquals("one _expanded_ two", markup);
}
Aggregations