use of org.eclipse.mylyn.wikitext.mediawiki.Template in project mylyn.docs by eclipse.
the class WikiTemplateResolverTest method testResolveTemplateOtherNamespace.
public void testResolveTemplateOtherNamespace() {
Template template = resolver.resolveTemplate("Other:Test");
assertNotNull(template);
assertEquals("Other:Test", template.getName());
assertEquals(OTHER_TEMPLATE_CONTENT, template.getTemplateMarkup().trim());
}
use of org.eclipse.mylyn.wikitext.mediawiki.Template in project mylyn.docs by eclipse.
the class WikiTemplateResolverTest method testResolveTemplateNoNamespace.
public void testResolveTemplateNoNamespace() {
Template template = resolver.resolveTemplate(":Test");
assertNotNull(template);
assertEquals(TEST_TEMPLATE_CONTENT, template.getTemplateMarkup().trim());
}
use of org.eclipse.mylyn.wikitext.mediawiki.Template 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.Template 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.Template 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