@Test public void getHtmlWithUrl() { when(context.getParameters()).thenReturn("http: assertEquals("<iframe width=\"560\" height=\"315\" src=\"http: "rel=0\" frameborder=\"0\" allowfullscreen></iframe>", runnable.getHtml(context)); }
@Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getQueryParams().get("v").get(0); } return "<iframe width=\"560\" height=\"315\" src=\"http: "?rel=0\" frameborder=\"0\" allowfullscreen></iframe>"; }
YoutubeMacro implements IMacroRunnable { @Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getQueryParams().get("v").get(0); } return "<iframe width=\"560\" height=\"315\" src=\"http: "?rel=0\" frameborder=\"0\" allowfullscreen></iframe>"; } }
YoutubeMacro implements IMacroRunnable { @Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getQueryParams().get("v").get(0); } return "<iframe width=\"560\" height=\"315\" src=\"http: "?rel=0\" frameborder=\"0\" allowfullscreen></iframe>"; }  }
YoutubeMacro implements IMacroRunnable { @Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getQueryParams().get("v").get(0); } return "<iframe width=\"560\" height=\"315\" src=\"http: "?rel=0\" frameborder=\"0\" allowfullscreen></iframe>"; }  @Override String getHtml(IMacroContext macroContext); @Override String cleanupHtml(String html); }
YoutubeMacro implements IMacroRunnable { @Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getQueryParams().get("v").get(0); } return "<iframe width=\"560\" height=\"315\" src=\"http: "?rel=0\" frameborder=\"0\" allowfullscreen></iframe>"; }  @Override String getHtml(IMacroContext macroContext); @Override String cleanupHtml(String html);  }