Examples of GistRequest


Examples of br.com.caelum.tubaina.gists.GistRequest

public class GistTagTest extends AbstractTagTest {

  @Test
  public void gistedCodeIsRetrievedAndUsed() throws Exception {
    GistResultRetriever retriever = new GistResultRetriever(new GistConnector(new JsonToGistResultConverter(),
        new GistRequest()));

    String options = "417835";
    @SuppressWarnings("unused")
    // code to be retrieved, we can only assert parts of it
    String gistedCode = "javascript:(function() {window.frames[3][0].document.getElementById('frameplugin').style.display='none'})()";
View Full Code Here

Examples of br.com.caelum.tubaina.gists.GistRequest

    long gistId = 417835;

    String json = new Scanner(JsonToGistResultConverter.class.getResourceAsStream("/gist.json"))
        .useDelimiter("\\Z").next();

    GistRequest mockedGistRequest = mock(GistRequest.class);
    when(mockedGistRequest.get(gistId)).thenReturn(json);

    GistConnector connector = new GistConnector(new JsonToGistResultConverter(), mockedGistRequest);

    GistResultRetriever retriever = new GistResultRetriever(connector);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.