@Test public void getHtml() { when(context.getParameters()).thenReturn("video123"); assertEquals("<iframe src=\"http: "height=\"281\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen " + "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().getPath().substring(1); } return "<iframe src=\"http: "width=\"500\" height=\"281\" frameborder=\"0\" " + "webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"; }
VimeoMacro implements IMacroRunnable { @Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getPath().substring(1); } return "<iframe src=\"http: "width=\"500\" height=\"281\" frameborder=\"0\" " + "webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"; } }
VimeoMacro implements IMacroRunnable { @Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getPath().substring(1); } return "<iframe src=\"http: "width=\"500\" height=\"281\" frameborder=\"0\" " + "webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"; }  }
VimeoMacro implements IMacroRunnable { @Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getPath().substring(1); } return "<iframe src=\"http: "width=\"500\" height=\"281\" frameborder=\"0\" " + "webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"; }  @Override String getHtml(IMacroContext macroContext); @Override String cleanupHtml(String html); }
VimeoMacro implements IMacroRunnable { @Override public String getHtml(IMacroContext macroContext) { String videoId = macroContext.getParameters().trim(); if (videoId.startsWith("http: videoId = UriComponentsBuilder.fromHttpUrl(videoId).build().getPath().substring(1); } return "<iframe src=\"http: "width=\"500\" height=\"281\" frameborder=\"0\" " + "webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"; }  @Override String getHtml(IMacroContext macroContext); @Override String cleanupHtml(String html);  }