Package org.jclouds.jenkins.v1.domain

Examples of org.jclouds.jenkins.v1.domain.Computer


            .build();
  
   public void testLastBuildWhenResponseIs2xx() {
      HttpResponse lastBuildResponse = HttpResponse.builder().statusCode(200)
         .payload(payloadFromResource("/lastBuild.json")).build();
      JenkinsApi apiWhenJobExists = requestSendsResponse(lastBuild, lastBuildResponse);
      assertEquals(apiWhenJobExists.getJobApi().lastBuild("ddd").toString(),
               new LastBuildTest().expected().toString());
   }
View Full Code Here


               new LastBuildTest().expected().toString());
   }
  
   public void testLastBuildWhenResponseIs404() {
      HttpResponse lastBuildResponse = HttpResponse.builder().statusCode(404).build();
      JenkinsApi getJobWhenGetd = requestSendsResponse(lastBuild, lastBuildResponse);
      assertNull(getJobWhenGetd.getJobApi().lastBuild("ddd"));
   }
View Full Code Here

            .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build();

      HttpResponse getComputerViewResponse = HttpResponse.builder().statusCode(200)
            .payload(payloadFromResource("/computerview.json")).build();

      JenkinsApi apiWhenServersExist = requestSendsResponse(getComputerView, getComputerViewResponse);

      assertEquals(apiWhenServersExist.getComputerApi().getView().toString(),
            new ParseComputerViewTest().expected().toString());
   }
View Full Code Here

            .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build();

      HttpResponse getComputerResponse = HttpResponse.builder().statusCode(200)
            .payload(payloadFromResource("/computer.json")).build();

      JenkinsApi apiWhenServersExist = requestSendsResponse(getComputer, getComputerResponse);

      assertEquals(apiWhenServersExist.getComputerApi().get("Ruboto").toString(),
            new ParseComputerTest().expected().toString());
   }
View Full Code Here

            .payload(payloadFromResourceWithContentType("/sample_job.xml", "text/xml"))
            .build();

      HttpResponse createJobResponse = HttpResponse.builder().statusCode(200).build();
  
      JenkinsApi createJobWhenCreated = requestSendsResponse(createJob, createJobResponse);

      createJobWhenCreated.getJobApi().createFromXML("blagoo", Strings2.toStringAndClose(getClass().getResourceAsStream("/sample_job.xml")));
   }
View Full Code Here

            .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==")
            .build();

      HttpResponse deleteJobResponse = HttpResponse.builder().statusCode(200).build();

      JenkinsApi deleteJobWhenDeleted = requestSendsResponse(deleteJob, deleteJobResponse);

      deleteJobWhenDeleted.getJobApi().delete("blagoo");
   }
View Full Code Here

            .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==")
            .build();

      HttpResponse deleteJobResponse = HttpResponse.builder().statusCode(404).build();

      JenkinsApi deleteJobWhenDeleted = requestSendsResponse(deleteJob, deleteJobResponse);

      deleteJobWhenDeleted.getJobApi().delete("blagoo");
   }
View Full Code Here

         .build();

   public void testGetJobWhenResponseIs2xx() {
      HttpResponse getJobResponse = HttpResponse.builder().statusCode(200)
         .payload(payloadFromResource("/job.json")).build();
      JenkinsApi apiWhenJobExists = requestSendsResponse(getJob, getJobResponse);
      assertEquals(apiWhenJobExists.getJobApi().get("ddd").toString(),
               new ParseJobDetailsTest().expected().toString());
   }
View Full Code Here

               new ParseJobDetailsTest().expected().toString());
   }
  
   public void testGetJobWhenResponseIs404() {
      HttpResponse getJobResponse = HttpResponse.builder().statusCode(404).build();
      JenkinsApi getJobWhenGetd = requestSendsResponse(getJob, getJobResponse);
      assertNull(getJobWhenGetd.getJobApi().get("ddd"));
   }
View Full Code Here

            .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==")
            .build();
  
   public void testBuildJobWhenResponseIs2xx() {
      HttpResponse buildJobResponse = HttpResponse.builder().statusCode(200).build();
      JenkinsApi apiWhenJobExists = requestSendsResponse(buildJob, buildJobResponse);
      apiWhenJobExists.getJobApi().build("ddd");
   }
View Full Code Here

TOP

Related Classes of org.jclouds.jenkins.v1.domain.Computer

Copyright © 2018 www.massapicom. 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.