Examples of CreatePollBean


Examples of org.encuestame.utils.web.CreatePollBean

    public void testSearchPollByType() throws Exception {
       
      final String[] answer = {"a", "b"};
        final String[] hashtag = {"hastag1", "hastag2"};
      //final CreatePollBean cb = createPollBean("ssssssssssss", answer, hashtag, "APPROVE", "ALL", true, null, null);
        final CreatePollBean createPollBean = new CreatePollBean();
    createPollBean.setQuestionName("ssss");
    createPollBean.setAnswers(answer);
    createPollBean.setHashtags(hashtag);
    createPollBean.setAllowAdd(Boolean.FALSE); //disable by default
    createPollBean.setLimitVote(3L);
    createPollBean.setMultiple(true);
    createPollBean.setResults("APROVE");
    createPollBean.setShowComments("ALL");
    createPollBean.setCloseDate(null);
    createPollBean.setFolder_name(null); //disable by default

//        ResultActions a = mockMvc.perform(post("/api/survey/poll")
//                .contentType(TestUtil.APPLICATION_JSON_UTF8)
//                .content(TestUtil.convertObjectToJsonBytes(createPollBean)));
//                //.andExpect(status().is())
View Full Code Here

Examples of org.encuestame.utils.web.CreatePollBean

                    double htx = getRandomNumberRange(0, totalhashtagss) - 1;
                    final HashTagBean b = hashtags.get(Double.valueOf(htx).intValue());
                    arrayHashtag[i] = b.getHashTagName();
                }
                //List<HashTagBean> hashtagList = Arrays.asList(arrayHashtag);
                final CreatePollBean createPollBean = new CreatePollBean();
                //question.getQuestionName(),arrayAnswers, "ALL", "MODERATE", true, hashtagList);
                //poll.setCreateDate(createRandomDate()
                createPollBean.setShowComments("MODERATE");
                createPollBean.setResults("ALL");
                createPollBean.setQuestionName(question.getQuestionName());
                createPollBean.setAnswers(arrayAnswers);
                createPollBean.setFolder_name(null);
                createPollBean.setMultiple(Boolean.FALSE);
                createPollBean.setCloseDate(null);
                createPollBean.setLimitVote(null);
                createPollBean.setAllowAdd(Boolean.FALSE);
                createPollBean.setHashtags(arrayHashtag);
                final Poll poll = getPollService().createPoll(createPollBean);
                getTweetPollDao().saveOrUpdate(poll);
                double hits = getRandomNumberRange(EnMePlaceHolderConfigurer
                        .getIntegerProperty("demo.min.poll.hits"), EnMePlaceHolderConfigurer
                        .getIntegerProperty("demo.max.poll.hits"));
View Full Code Here

Examples of org.encuestame.utils.web.CreatePollBean

        final PollBean unitPoll = ConvertDomainBean.convertPollDomainToBean(this.poll);
        unitPoll.setQuestionBean(question);
        //"ssss", this.answers, "ALL", "APPROVE" ,Boolean.TRUE, this.tagBeanList
        final String[] answer = {"a", "b"};
        final String[] hashtag = {"hastag1", "hastag2"};
        final CreatePollBean cb = createPollBean("ssssssssssss",answer, hashtag, "MODERATE", "ALL", true, null, null);
        final Poll myPoll = this.pollService.createPoll(cb);
        Assert.assertNotNull(myPoll);
    }
View Full Code Here

Examples of org.encuestame.utils.web.CreatePollBean

  @Test
  public void testRemovePoll() throws EnMeExpcetion {
    //this.answers[3] = "answer Four";
    final String[] answer = {"a", "b"};
        final String[] hashtag = {"hastag1", "hastag2"};
        final CreatePollBean cb = createPollBean("ssssssssssss",answer, hashtag, "APPROVE", "ALL", true, null, null);
    final Poll newPollService = this.pollService.createPoll(cb);

    final List<QuestionAnswer> beforeAnswers = getQuestionDaoImp()
        .getAnswersByQuestionId(newPollService.getQuestion().getQid());
    assertEquals(beforeAnswers.size(), 2);
View Full Code Here

Examples of org.encuestame.utils.web.CreatePollBean

    unitPoll.setQuestionBean(question);
   
   
    final String[] answer = {"a", "b"};
        final String[] hashtag = {"hastag1", "hastag2"};
        final CreatePollBean cb = createPollBean("dddd",answer, hashtag, "APPROVE", "ALL", true, null, null);
    final Poll myPoll = this.pollService.createPoll(cb);

    Assert.assertNotNull(myPoll);
    final String[] answer1 = {"a", "b"};
        final String[] hashtag2 = {"hastag3", "hastag4"};
        final CreatePollBean cb2 = createPollBean("dddd",answer1, hashtag2, "APPROVE", "ALL", true, null, null);
    final Poll myPoll2 = this.pollService.createPoll(cb2);
    Assert.assertNotNull(myPoll2);

    final List<Poll> retrievePollsbyTagBeforeRemove = getPollDao()
        .getPollByHashTagName(this.tag1.getHashTag(), this.START,
View Full Code Here

Examples of org.encuestame.utils.web.CreatePollBean

      final String showResults,
      final Boolean multipleSelection,
      final Long limitVotes,
      final Long closeDate) {
        //"ssss", this.answers, "ALL", "APPROVE" ,Boolean.TRUE, this.tagBeanList
    final CreatePollBean createPollBean = new CreatePollBean();
    createPollBean.setQuestionName(questionName);
    createPollBean.setAnswers(answer);
    createPollBean.setHashtags(hashtag);
    createPollBean.setAllowAdd(Boolean.FALSE); //disable by default
    createPollBean.setLimitVote(limitVotes);
    createPollBean.setMultiple(multipleSelection);
    createPollBean.setResults(showResults);
    createPollBean.setShowComments(showComments);
    createPollBean.setCloseDate(closeDate);
    createPollBean.setFolder_name(null); //disable by default
    return createPollBean;
  }
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.