Package org.encuestame.persistence.domain.question

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


   * @throws EnMeNoResultsFoundException
   */
  @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);
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
View Full Code Here

  @Test
  public void testAddHashtagToTweetPoll() throws EnMeNoResultsFoundException {
    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);
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");
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");
View Full Code Here

   */
  @Test
  public void testCheckTweetPollCompleteStatus()
      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",
        "No", myQuestion.getQid());

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

   * @throws EnMeNoResultsFoundException
   */
  @Test
  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()
View Full Code Here

   * @throws EnMeNoResultsFoundException
   */
  @Test
  public void testCreateTweetPollNotification()
      throws EnMeNoResultsFoundException {
    final Question question1 = createQuestion("Why the sea is salt? 6",
        "html");

    final TweetPoll tp = createTweetPollPublicated(true, true, new Date(),
        this.userAccount, question1);

View Full Code Here

   *
   * @throws EnMeExpcetion
   */
  @Test
  public void testgenerateTweetPollContent() throws EnMeExpcetion {
    final Question question1 = createQuestion("Why the sea is salt? 6",
        "html");

    final TweetPoll tp = createTweetPollPublicated(true, true, new Date(),
        this.userAccount, question1);
    final String tweetcontent = getTweetPollService()
View Full Code Here

   *
   * @throws EnMeNoResultsFoundException
   */
  @Test
  public void testremoveQuestionAnswer() throws EnMeNoResultsFoundException {
    final Question question1 = createQuestion("Why the sea is salt? 6",
        "html");

    final TweetPoll myTweetPoll = createTweetPollPublicated(true, true,
        new Date(), this.userAccount, question1);

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

    final List<QuestionAnswer> qAnswer = getQuestionDaoImp()
        .getAnswersByQuestionId(question1.getQid());
    final TweetPollSwitch pollSwitch = tweetPollService
        .createTweetPollQuestionAnswer(qAnswerBean, myTweetPoll, null);
    final TweetPollSwitch pollSwitch2 = tweetPollService
        .createTweetPollQuestionAnswer(qAnswerBean, myTweetPoll, null);

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.