@Test public void testRequiredParameterMissing() throws Exception { Throwable exception = assertThrows(MacroExecutionException.class, () -> { this.macro.execute(new RssMacroParameters(), null, null); }); assertEquals("The required 'feed' parameter is missing", exception.getMessage()); }
@Override public List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { List<Block> result; SyndFeed feed = this.romeFeedFactory.createFeed(parameters); this.setFeed(feed); if (parameters.isDecoration()) { result = super.execute(parameters, content == null ? StringUtils.EMPTY : content, context); } else { result = Arrays.<Block>asList(new GroupBlock(Collections.singletonMap(CLASS_ATTRIBUTE, FEED_CLASS_VALUE))); } generateEntries(result.get(0), feed, parameters); this.removeContextFeed(); return result; }
RssMacro extends AbstractBoxMacro<RssMacroParameters> { @Override public List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { List<Block> result; SyndFeed feed = this.romeFeedFactory.createFeed(parameters); this.setFeed(feed); if (parameters.isDecoration()) { result = super.execute(parameters, content == null ? StringUtils.EMPTY : content, context); } else { result = Arrays.<Block>asList(new GroupBlock(Collections.singletonMap(CLASS_ATTRIBUTE, FEED_CLASS_VALUE))); } generateEntries(result.get(0), feed, parameters); this.removeContextFeed(); return result; } }
RssMacro extends AbstractBoxMacro<RssMacroParameters> { @Override public List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { List<Block> result; SyndFeed feed = this.romeFeedFactory.createFeed(parameters); this.setFeed(feed); if (parameters.isDecoration()) { result = super.execute(parameters, content == null ? StringUtils.EMPTY : content, context); } else { result = Arrays.<Block>asList(new GroupBlock(Collections.singletonMap(CLASS_ATTRIBUTE, FEED_CLASS_VALUE))); } generateEntries(result.get(0), feed, parameters); this.removeContextFeed(); return result; } RssMacro(); }
RssMacro extends AbstractBoxMacro<RssMacroParameters> { @Override public List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { List<Block> result; SyndFeed feed = this.romeFeedFactory.createFeed(parameters); this.setFeed(feed); if (parameters.isDecoration()) { result = super.execute(parameters, content == null ? StringUtils.EMPTY : content, context); } else { result = Arrays.<Block>asList(new GroupBlock(Collections.singletonMap(CLASS_ATTRIBUTE, FEED_CLASS_VALUE))); } generateEntries(result.get(0), feed, parameters); this.removeContextFeed(); return result; } RssMacro(); @Override boolean supportsInlineMode(); @Override List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context); }
RssMacro extends AbstractBoxMacro<RssMacroParameters> { @Override public List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { List<Block> result; SyndFeed feed = this.romeFeedFactory.createFeed(parameters); this.setFeed(feed); if (parameters.isDecoration()) { result = super.execute(parameters, content == null ? StringUtils.EMPTY : content, context); } else { result = Arrays.<Block>asList(new GroupBlock(Collections.singletonMap(CLASS_ATTRIBUTE, FEED_CLASS_VALUE))); } generateEntries(result.get(0), feed, parameters); this.removeContextFeed(); return result; } RssMacro(); @Override boolean supportsInlineMode(); @Override List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context);  }