1 package net.pterodactylus.sone.main;
3 import static org.hamcrest.MatcherAssert.assertThat;
4 import static org.hamcrest.Matchers.is;
6 import java.util.Collections;
8 import net.pterodactylus.util.template.TemplateContext;
10 import org.junit.Test;
13 * Unit test for {@link ReparseFilter}.
15 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
17 public class ReparseFilterTest {
19 private final ReparseFilter reparseFilter = new ReparseFilter();
22 public void filterParsesTemplateCorrectly() {
23 TemplateContext templateContext = new TemplateContext();
24 templateContext.set("bar", "baz");
25 assertThat(reparseFilter.format(templateContext, "foo <% bar>", Collections.<String, Object>emptyMap()),
26 is((Object) "foo baz"));