Package org.encuestame.persistence.domain.question

Examples of org.encuestame.persistence.domain.question.Question



    @Before
    public void initService(){

        final Question question = createQuestion("Why the sky is blue?","html");
        this.tweetPoll = createTweetPollPublicated(true, true, new Date(), getSpringSecurityLoggedUserAccount(), question);
        // First comment on Tweetpoll
        this.comment = createDefaultTweetPollComment("My first tweetPoll comment", tweetPoll, getSpringSecurityLoggedUserAccount());
        // Second comment on Tweetpoll
        createDefaultTweetPollComment("My Second tweetPoll comment", tweetPoll, getSpringSecurityLoggedUserAccount());
View Full Code Here


    final String questionName = "What is your favorite superhero?";
    final Survey defaultSurvey = createDefaultSurvey(this.user);
    final SurveySection defaultSection = createDefaultSection("Comics",
        defaultSurvey);

    final Question questionAdded = surveyService
        .addQuestionToSurveySection(questionName, userSecondary,
            defaultSection, QuestionPattern.MULTIPLE_SELECTION,
            null);

    assertEquals("should be equals", defaultSection.getSsid(),
        questionAdded.getSection().getSsid());
  }
View Full Code Here

       
      final Account account = createAccount();
        final UserAccount userAccount = getSpringSecurityLoggedUserAccount();
       
        createHashTag("nicaragua");
        final Question question = createQuestion("Has scala great future as program language?", account);
        createQuestion("What is your favorite program language?", account);
   
        final TweetPoll tp = createTweetPoll(1234567L, true, true, true, true,
        null, null, new Date(), false, account, question, null);
       
View Full Code Here

   * @param creationDate
   * @return
   */
  private TweetPoll createTweetPollTest(final String questionName,
      final Date creationDate) {
    final Question question = createQuestion(
        "What is your favorite futboll team22?", this.secondary.getAccount());
    final TweetPoll tweetPoll = createPublishedTweetPoll(
        this.secondary.getAccount(), question, creationDate);
    return tweetPoll;
  }
View Full Code Here

   *
   * @throws EnMeExpcetion
   */
  @Category(DefaultTest.class)
  public void testSaveTweetId() throws EnMeExpcetion {
    Question questionSave = createQuestion("how much or How Many?", "html");
    final Account usersave = createUser("dianmora", "xxxxxxx");
    final UserAccount account = createUserAccount("jota", usersave);
    final String tweetUrl = "http://www.encuestame.org";
    final TweetPoll tweetPoll = createTweetPollPublicated(true, true,
        new Date(), account, questionSave);

    answersSaveTweet = new ArrayList<QuestionAnswerBean>();
    answersSaveTweet.add(createAnswersBean("GBHD", "Maybe",
        questionSave.getQid()));
    answersSaveTweet.add(createAnswersBean("GTJU", "Yes",
        questionSave.getQid()));

    questionBean = createUnitQuestionBean(questionSave.getQuestion(), 1L,
        usersave.getUid(), answersSaveTweet);
    final TweetPollBean unitTweetPoll = createUnitTweetPollPublicated(
        new Date(), true, tweetUrl, usersave.getUid(),
        this.questionBean, null);
    unitTweetPoll.setId(tweetPoll.getTweetPollId());
View Full Code Here

  @Test
  @Category(DefaultTest.class)
  public void testGetTweetsPollsByUserName()
      throws EnMeNoResultsFoundException {
    final Question question1 = createQuestion("Why the sea is salad?",
        "html");
    final Question question2 = createQuestion("Why the sea is big?", "html");
    createTweetPollPublicated(true, true, new Date(), this.userAccount,
        question1);
    createTweetPollPublicated(true, true, new Date(), this.userAccount,
        question2);
    final UserAccount secUser = createUserAccount("diana", this.user);
View Full Code Here

     */
  @Category(InternetTest.class)
  @Test
  public void testPublishPollOnMultiplesTweetAccounts() {

    final Question otherQuestion = createDefaultQuestion("What is your favorite android app");

    final Poll myPoll = createDefaultPoll(otherQuestion, this.userAccount);

    final List<TweetPollSavedPublishedStatus> itemsPublished = tweetPollService
        .publishMultiplesOnSocialAccounts(this.socialBeans, null,
View Full Code Here

        "tweetPollUrl", getSpringSecurityLoggedUserAccount().getUid(),
        questionBean);
    final TweetPoll myTweetPoll = tweetPollService.createTweetPoll(
        myTpBean, "What is your favourite city?",
        getSpringSecurityLoggedUserAccount(), null);
    final Question myQuestion = createQuestion(
        "What is your favourite city", "pattern");

    final QuestionAnswerBean qAnswerBean = createAnswersBean("26354",
        "Yes", myQuestion.getQid());
    final QuestionAnswerBean qAnswerBean2 = createAnswersBean("26355",
        "No", myQuestion.getQid());

    final TweetPollSwitch pollSwitch = tweetPollService
        .createTweetPollQuestionAnswer(qAnswerBean, myTweetPoll, null);
    final TweetPollSwitch pollSwitch2 = tweetPollService
        .createTweetPollQuestionAnswer(qAnswerBean, myTweetPoll, null);
View Full Code Here

  public void testFilterTweetPollByItemsByType()
      throws EnMeNoResultsFoundException, EnMeExpcetion {
    final DateTime date1 = new DateTime();
    DateTime dt2 = date1.minusDays(5);
    DateTime dt3 = date1.minusDays(4);
    final Question q1 = createDefaultQuestion("What is your favourite movie");
    final Question q2 = createDefaultQuestion("What is your favourite book");
    final Question q3 = createDefaultQuestion("What is your favourite song");

    final String keyword = "favourite";

    final TweetPoll tp1 = createPublishedTweetPoll(
        getSpringSecurityLoggedUserAccount().getAccount(), q1);
View Full Code Here

  public void testFilterTweetPollByItemsByTypeSearch()
      throws EnMeNoResultsFoundException, EnMeExpcetion {
    final DateTime date1 = new DateTime();
    DateTime dt2 = date1.minusDays(5);
    DateTime dt3 = date1.minusDays(4);
    final Question q1 = createDefaultQuestion("What is your favourite movie");
    final Question q2 = createDefaultQuestion("What is your favourite book");
    final Question q3 = createDefaultQuestion("What is your favourite song");

    final String keyword = "favourite";

    final TweetPoll tp1 = createPublishedTweetPoll(
        getSpringSecurityLoggedUserAccount().getAccount(), q1);
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.question.Question

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.