@Test public void testSyntaxError() throws Exception { MockApplication<?> app = application("plugin.template.syntaxerror").init(); }
@Test public void testSyntaxError() throws Exception { MockApplication<?> app = application("plugin.template.syntaxerror").init(); }
@Test public void testTyped() throws Exception { MockApplication<?> app = application("plugin.template.typed").init(); MockClient client = app.client(); assertEquals("typed_template", client.render().assertStringResponse()); }
@Test public void testRelativePath() throws Exception { MockApplication<?> app = application("plugin.template.relativepath").init(); MockClient client = app.client(); assertEquals("relative_path_template", client.render().assertStringResponse()); }
@Test public void testTyped() throws Exception { MockApplication<?> app = application("plugin.template.typed").init(); MockClient client = app.client(); assertEquals("typed_template", client.render().assertStringResponse()); }
@Test public void testUndeclaredIOE() throws Exception { MockApplication<?> app = application("plugin.template.ioe").init(); MockClient client = app.client(); assertEquals("pass", client.render().assertStringResponse()); }
@Test public void testRelativePath() throws Exception { MockApplication<?> app = application("plugin.template.relativepath").init(); MockClient client = app.client(); assertEquals("relative_path_template", client.render().assertStringResponse()); }
@Test public void testUndeclaredIOE() throws Exception { MockApplication<?> app = application("plugin.template.ioe").init(); MockClient client = app.client(); assertEquals("pass", client.render().assertStringResponse()); }
@Test public void testMessage() throws Exception { MockApplication<?> app = application("plugin.template.message").init(); app.addMessage(Locale.ENGLISH, "the_key", "the_key_en"); MockClient client = app.client(); assertEquals("(the_key_en,)", client.render().assertStringResponse()); }
@Test public void testMessage() throws Exception { MockApplication<?> app = application("plugin.template.message").init(); app.addMessage(Locale.ENGLISH, "the_key", "the_key_en"); MockClient client = app.client(); assertEquals("(the_key_en,)", client.render().assertStringResponse()); }
@Test public void testPrecompileGroovy() throws Exception { MockApplication<File> app = application("plugin.template.simple").init(); ReadFileSystem<File> fs = app.getClasses(); File groovy = fs.getPath("plugin", "template", "simple", "templates", "index_.groovy"); assertNotNull(groovy); CompilerConfiguration config = new CompilerConfiguration(); config.setTargetDirectory(fs.getRoot()); CompilationUnit cu = new CompilationUnit(config); cu.addSource(groovy); cu.compile(); assertTrue(groovy.delete()); MockClient client = app.client(); assertEquals("hello", client.render().assertStringResponse()); } }
@Test public void testPrecompileGroovy() throws Exception { MockApplication<File> app = application("plugin.template.simple").init(); ReadFileSystem<File> fs = app.getClasses(); File groovy = fs.getPath("plugin", "template", "simple", "templates", "index_.groovy"); assertNotNull(groovy); CompilerConfiguration config = new CompilerConfiguration(); config.setTargetDirectory(fs.getRoot()); CompilationUnit cu = new CompilationUnit(config); cu.addSource(groovy); cu.compile(); assertTrue(groovy.delete()); MockClient client = app.client(); assertEquals("hello", client.render().assertStringResponse()); } }