mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
throw io exception if template is not parse able
This commit is contained in:
@@ -69,6 +69,14 @@ public abstract class TemplateEngineTestBase
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract String getDefectTemplateResource();
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -79,6 +87,21 @@ public abstract class TemplateEngineTestBase
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test(expected = IOException.class)
|
||||
public void testGetDefectTemplate() throws IOException
|
||||
{
|
||||
ServletContext context = mock(ServletContext.class);
|
||||
TemplateEngine engine = createEngine(context);
|
||||
|
||||
engine.getTemplate(getDefectTemplateResource());
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user