Examples of VmPendingQuestion


Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

      return task;
   }

   public static VmPendingQuestion getPendingQuestion() {
      VmPendingQuestion question = VmPendingQuestion.builder()
            .build();

      return question;
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getPendingQuestion.xml", VCloudDirectorMediaType.VM_PENDING_QUESTION)
            .httpResponseBuilder().build());

         VmPendingQuestion expected = getPendingQuestion();

         assertEquals(api.getVmApi().getPendingQuestion(vmURI), expected);
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

      return task;
   }

   public static VmPendingQuestion getPendingQuestion() {
      VmPendingQuestion question = VmPendingQuestion.builder()
            .build();

      return question;
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

      vm = powerOnVm(vmUrn);

      // TODO how to test?

      // The method under test
      VmPendingQuestion question = vmApi.getPendingQuestion(vmUrn);

      // Check the retrieved object is well formed
      checkVmPendingQuestion(question);
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

   @Test(description = "POST /vApp/{id}/question/action/answer", dependsOnMethods = { "testGetPendingQuestion" })
   public void testAnswerQuestion() {
      // TODO check that the question has been answered (e.g. asking for getPendingQuestion does not
      // include our answered question).

      VmPendingQuestion question = vmApi.getPendingQuestion(vmUrn);
      List<VmQuestionAnswerChoice> answerChoices = question.getChoices();
      VmQuestionAnswerChoice answerChoice = Iterables.getFirst(answerChoices, null);
      assertNotNull(answerChoice, "Question " + question + " must have at least once answer-choice");

      VmQuestionAnswer answer = VmQuestionAnswer.builder().choiceId(answerChoice.getId())
               .questionId(question.getQuestionId()).build();

      vmApi.answerQuestion(vmUrn, answer);
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

      return task;
   }

   public static VmPendingQuestion getPendingQuestion() {
      VmPendingQuestion question = VmPendingQuestion.builder()
            .build();

      return question;
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

      return task;
   }

   public static VmPendingQuestion getPendingQuestion() {
      VmPendingQuestion question = VmPendingQuestion.builder()
            .build();

      return question;
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

      vm = powerOnVm(vmUrn);

      // TODO how to test?

      // The method under test
      VmPendingQuestion question = vmApi.getPendingQuestion(vmUrn);

      // Check the retrieved object is well formed
      checkVmPendingQuestion(question);
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

   @Test(description = "POST /vApp/{id}/question/action/answer", dependsOnMethods = { "testGetPendingQuestion" })
   public void testAnswerQuestion() {
      // TODO check that the question has been answered (e.g. asking for getPendingQuestion does not
      // include our answered question).

      VmPendingQuestion question = vmApi.getPendingQuestion(vmUrn);
      List<VmQuestionAnswerChoice> answerChoices = question.getChoices();
      VmQuestionAnswerChoice answerChoice = Iterables.getFirst(answerChoices, null);
      assertNotNull(answerChoice, "Question " + question + " must have at least once answer-choice");

      VmQuestionAnswer answer = VmQuestionAnswer.builder().choiceId(answerChoice.getId())
               .questionId(question.getQuestionId()).build();

      vmApi.answerQuestion(vmUrn, answer);
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion

            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/getPendingQuestion.xml", VCloudDirectorMediaType.VM_PENDING_QUESTION)
            .httpResponseBuilder().build());

         VmPendingQuestion expected = getPendingQuestion();

         assertEquals(api.getVmApi().getPendingQuestion(vmURI), expected);
   }
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.