Package org.encuestame.persistence.domain.tweetpoll

Examples of org.encuestame.persistence.domain.tweetpoll.TweetPoll


    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);
    tp1.setCreateDate(dt3.toDate());
    tp1.setCompleted(Boolean.TRUE);
    getTweetPoll().saveOrUpdate(tp1);

    final TweetPoll tp2 = createPublishedTweetPoll(
        getSpringSecurityLoggedUserAccount().getAccount(), q2);
    tp2.setCreateDate(dt2.toDate());
    tp2.setCompleted(Boolean.TRUE);

    getTweetPoll().saveOrUpdate(tp2);

    final TweetPoll tp3 = createPublishedTweetPoll(
        getSpringSecurityLoggedUserAccount().getAccount(), q3);
    final TweetPollSearchBean tpSearch = createTweetpollSearchBean(
        Boolean.TRUE, Boolean.TRUE, Boolean.TRUE, Boolean.TRUE, "your",
        "24", 10, 0, TypeSearch.LASTWEEK);
    final List<SearchBean> tpoll = getTweetPollService()
View Full Code Here


    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);
    tp1.setCreateDate(dt3.toDate());
    tp1.setCompleted(Boolean.TRUE);
    getTweetPoll().saveOrUpdate(tp1);

    final TweetPoll tp2 = createPublishedTweetPoll(
        getSpringSecurityLoggedUserAccount().getAccount(), q2);
    tp2.setCreateDate(dt2.toDate());
    tp2.setCompleted(Boolean.TRUE);

    getTweetPoll().saveOrUpdate(tp2);

    final TweetPoll tp3 = createPublishedTweetPoll(
        getSpringSecurityLoggedUserAccount().getAccount(), q3);
    final TweetPollSearchBean tpSearch = createTweetpollSearchBean(
        Boolean.TRUE, Boolean.TRUE, Boolean.TRUE, Boolean.TRUE, "your",
        "24", 10, 0, TypeSearch.BYOWNER);
    final List<SearchBean> tpollSearch = getTweetPollService()
View Full Code Here

    providers.add(SocialProvider.LINKEDIN);
    providers.add(SocialProvider.TWITTER);
    providers.add(SocialProvider.IDENTICA);

    // Completed - Favourites - Scheduled - Published
    final TweetPoll tp1 = this.createTweetPollItems(creationDate.toDate(),
        this.userAccount.getAccount(), Boolean.TRUE, Boolean.FALSE,
        Boolean.FALSE, Boolean.TRUE);
    createTweetPollSavedPublishStatusMultiple(tp1, providers, socialAccount);

    final TweetPoll tp2 = this.createTweetPollItems(creationDate.toDate(),
        this.userAccount.getAccount(), Boolean.TRUE, Boolean.FALSE,
        Boolean.FALSE, Boolean.TRUE);

    createTweetPollSavedPublishStatusMultiple(tp2, providers, socialAccount);

    final TweetPoll tp3 = this.createTweetPollItems(creationDate.toDate(),
        this.userAccount.getAccount(), Boolean.TRUE, Boolean.FALSE,
        Boolean.TRUE, Boolean.TRUE);

    createTweetPollSavedPublishStatusMultiple(tp1, providers, socialAccount);

    final TweetPoll tp4 = this.createTweetPollItems(creationDate.toDate(),
        this.userAccount.getAccount(), Boolean.FALSE, Boolean.FALSE,
        Boolean.FALSE, Boolean.FALSE);
    /*
     * // 24 hours creationDate = creationDate.minusDays(3);
     * this.createTweetPollItems(creationDate.toDate(),
 
View Full Code Here

  @Test
  public void testSearchTweetPollsByFolder()
      throws EnMeNoResultsFoundException {
    final Question question1 = createQuestion("Why the sea is salad?",
        "html");
    final TweetPoll tp = createTweetPollPublicated(true, true, new Date(),
        this.userAccount, question1);
    tp.setTweetPollFolder(this.folder);
    getTweetPoll().saveOrUpdate(tp);

    final TweetPoll tp2 = createTweetPollPublicated(true, true, new Date(),
        this.userAccount, question1);
    tp2.setTweetPollFolder(this.folder);
    getTweetPoll().saveOrUpdate(tp2);

    final List<TweetPollBean> tpollsfolders = getTweetPollService()
        .searchTweetPollsByFolder(this.folder.getId(),
            getSpringSecurityLoggedUserAccount().getUsername());
View Full Code Here

  @Test
  public void testGetTweetPollsbyRange() {
    final DateTime cale = new DateTime().minusDays(1);
    final Question question1 = createQuestion("Why the sea is salad?",
        "html");
    final TweetPoll tp = createTweetPollPublicated(true, true,
        cale.toDate(), this.userAccount, question1);
    final DateTime cale2 = new DateTime().minusDays(1);
    // No encuentra nada porque el metodo no tiene riteria de rango de fecha
    final List<TweetPoll> tweetPollsbyRange = getTweetPollService()
        .getTweetPollsbyRange(10, 0, cale2.toDate());
View Full Code Here

    final HashTag ht = createHashTag("xx");
    final HashTagBean tagBean = this.createHashTagBean("Hashtag bean", 20L,
        ht.getSize().intValue());
    final Question question1 = createQuestion("Why the sea is salad?",
        "html");
    final TweetPoll tp = createTweetPollPublicated(true, true, new Date(),
        this.userAccount, question1);
    final HashTag ht2 = getTweetPollService().addHashtagToTweetPoll(tp,
        tagBean);
    assertEquals("Should be equals", tagBean.getHashTagName(),
        ht2.getHashTag());
View Full Code Here

  @Test
  public void testgetTweetPollSwitch() {

    final Question question1 = createQuestion("Why the sea is salad?",
        "html");
    final TweetPoll tp = createTweetPollPublicated(true, true, new Date(),
        this.userAccount, question1);
    final QuestionAnswer qA = createQuestionAnswer("string", question1,
        "JDKSLD");
    final QuestionAnswer qB = createQuestionAnswer("string", question1,
        "JDKSELD");
View Full Code Here

     */
  @Test
  public void testGetTweetPollTotalVotes() {
    final Question question1 = createQuestion("Why the sea is salad?",
        "html");
    final TweetPoll tp = createTweetPollPublicated(true, true, new Date(),
        this.userAccount, question1);
    final QuestionAnswer qA = createQuestionAnswer("YES", question1,
        "JDKSLD");
    final QuestionAnswer qB = createQuestionAnswer("NO", question1,
        "JDKSSLD");
View Full Code Here

      throws EnMeNoResultsFoundException {

    final Question myQuestion = createQuestion("Why the sea is salad? 3",
        "html");
    final DateTime dt = new DateTime();
    final TweetPoll myTweetPoll = createTweetPollPublicated(true, false,
        dt.toDate(), this.userAccount, myQuestion);
    myTweetPoll.setLimitVotesEnabled(Boolean.TRUE);
    myTweetPoll.setLimitVotes(2);
    getTweetPoll().saveOrUpdate(myTweetPoll);

    final QuestionAnswerBean qAnswerBean = createAnswersBean("26354",
        "Yes", myQuestion.getQid());
    final QuestionAnswerBean qAnswerBean2 = createAnswersBean("26355",
View Full Code Here

  public void testGetTweetPollByIdSlugName()
      throws EnMeNoResultsFoundException {
    final Question question1 = createQuestion("Why the sea is salt? 6",
        "html");

    final TweetPoll tp = createTweetPollPublicated(true, true, new Date(),
        this.userAccount, question1);
    final TweetPoll tpollSlug = getTweetPollService()
        .getTweetPollByIdSlugName(tp.getTweetPollId(),
            "Why-the-sea-is-salt%3F-6");

  }
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.tweetpoll.TweetPoll

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.