@Test public void testInclude() throws Exception { MockApplication<?> app = application("plugin.template.tag.include").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("foo", out); }
@Test public void testSimpleNested() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.nested").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("<index><foo><bar>foo_content</bar></foo></index>", out); }
@Test public void testDecorateNested() throws Exception { MockApplication<?> app = application("plugin.template.tag.decoratenested").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("<juu><foo>bar</foo></juu>", out); }
@Test public void testIncludeDouble() throws Exception { MockApplication<?> app = application("plugin.template.tag.includedouble").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("foobar", out); }
@Test public void testSimpleNested() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.nested").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("<index><foo><bar>foo_content</bar></foo></index>", out); }
@Test public void testIncludeTwice() throws Exception { MockApplication<?> app = application("plugin.template.tag.includetwice").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("foofoo", out); }
@Test public void testSimpleBody() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.body").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("<foo>the_body</foo>", out); }
@Test public void testInclude() throws Exception { MockApplication<?> app = application("plugin.template.tag.include").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("foo", out); }
@Test public void testDecorate() throws Exception { MockApplication<?> app = application("plugin.template.tag.decorate").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("<foo>bar</foo>", out); }
@Test public void testSimpleRender() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.render").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("foothe_tagbar", out); }
@Test public void testSimpleInclude() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.include").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("pass", out); }
@Test public void testDecorate() throws Exception { MockApplication<?> app = application("plugin.template.tag.decorate").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("<foo>bar</foo>", out); }
@Test public void testSimpleRender() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.render").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("foothe_tagbar", out); }
@Test public void testSimpleParameters() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.parameters").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("-[:]-[a:b]-", out); }
@Test public void testSimpleInclude() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.include").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("pass", out); }
@Test public void testSimpleBody() throws Exception { MockApplication<?> app = application("plugin.template.tag.simple.body").init(); MockClient client = app.client(); MockViewBridge render = client.render(); String out = render.assertStringResponse(); assertEquals("<foo>the_body</foo>", out); }
@Test public void testParam() throws Exception { if (getDI() != InjectorProvider.GUICE) { MockApplication<?> app = application("plugin.template.tag.param").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String content = render.assertStringResponse(); assertEquals("foo_value", content); } }
@Test public void testParam() throws Exception { if (getDI() != InjectorProvider.GUICE) { MockApplication<?> app = application("plugin.template.tag.param").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String content = render.assertStringResponse(); assertEquals("foo_value", content); } }
@Test public void testTitle() throws Exception { MockApplication<?> app = application("plugin.template.tag.title").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String url = render.assertStringResponse(); assertEquals("the_title", render.getTitle()); render = (MockViewBridge)client.invoke(url); assertEquals("4", render.getTitle()); }
@Test public void testTitle() throws Exception { MockApplication<?> app = application("plugin.template.tag.title").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String url = render.assertStringResponse(); assertEquals("the_title", render.getTitle()); render = (MockViewBridge)client.invoke(url); assertEquals("4", render.getTitle()); }