@Test public void getContent() throws Exception { LESSSkinFileResourceReference lessSkinFileResourceReference = new LESSSkinFileResourceReference("style.less", templateManager, skinManager); Template template = mock(Template.class); when(templateManager.getTemplate("less/style.less", skin)).thenReturn(template); TemplateContent templateContent = mock(TemplateContent.class); when(template.getContent()).thenReturn(templateContent); when(templateContent.getContent()).thenReturn(" assertEquals(" }
@Override public String getContent(String skin) throws LESSCompilerException { Template template = templateManager.getTemplate("less/" + fileName, skinManager.getSkin(skin)); if (template == null) { throw new LESSCompilerException(String.format("The template [%s] does not exists.", fileName)); } try { return template.getContent().getContent(); } catch (Exception e) { throw new LESSCompilerException( String.format("Failed to get the content of the template [%s].", fileName), e); } }
LESSSkinFileResourceReference implements LESSResourceReference { @Override public String getContent(String skin) throws LESSCompilerException { Template template = templateManager.getTemplate("less/" + fileName, skinManager.getSkin(skin)); if (template == null) { throw new LESSCompilerException(String.format("The template [%s] does not exists.", fileName)); } try { return template.getContent().getContent(); } catch (Exception e) { throw new LESSCompilerException( String.format("Failed to get the content of the template [%s].", fileName), e); } } }
LESSSkinFileResourceReference implements LESSResourceReference { @Override public String getContent(String skin) throws LESSCompilerException { Template template = templateManager.getTemplate("less/" + fileName, skinManager.getSkin(skin)); if (template == null) { throw new LESSCompilerException(String.format("The template [%s] does not exists.", fileName)); } try { return template.getContent().getContent(); } catch (Exception e) { throw new LESSCompilerException( String.format("Failed to get the content of the template [%s].", fileName), e); } } LESSSkinFileResourceReference(String fileName, TemplateManager templateManager, SkinManager skinManager); }
LESSSkinFileResourceReference implements LESSResourceReference { @Override public String getContent(String skin) throws LESSCompilerException { Template template = templateManager.getTemplate("less/" + fileName, skinManager.getSkin(skin)); if (template == null) { throw new LESSCompilerException(String.format("The template [%s] does not exists.", fileName)); } try { return template.getContent().getContent(); } catch (Exception e) { throw new LESSCompilerException( String.format("Failed to get the content of the template [%s].", fileName), e); } } LESSSkinFileResourceReference(String fileName, TemplateManager templateManager, SkinManager skinManager); @Override boolean equals(Object o); @Override int hashCode(); @Override String getContent(String skin); @Override String serialize(); @Override String toString(); }
LESSSkinFileResourceReference implements LESSResourceReference { @Override public String getContent(String skin) throws LESSCompilerException { Template template = templateManager.getTemplate("less/" + fileName, skinManager.getSkin(skin)); if (template == null) { throw new LESSCompilerException(String.format("The template [%s] does not exists.", fileName)); } try { return template.getContent().getContent(); } catch (Exception e) { throw new LESSCompilerException( String.format("Failed to get the content of the template [%s].", fileName), e); } } LESSSkinFileResourceReference(String fileName, TemplateManager templateManager, SkinManager skinManager); @Override boolean equals(Object o); @Override int hashCode(); @Override String getContent(String skin); @Override String serialize(); @Override String toString();  }