Examples of UnitSurveySection


Examples of org.encuestame.utils.web.UnitSurveySection

    /**
     * Test {@link UnitSurveySection}.
     */
    @Test
    public void testUnitSurveySectionBean(){
        final UnitSurveySection surveySectionBean = new UnitSurveySection();
        final List<QuestionBean> questionBeanList = new ArrayList<QuestionBean>();
        questionBeanList.add(new QuestionBean("First Question"));
        questionBeanList.add(new QuestionBean("Second Question"));
        questionBeanList.add(new QuestionBean("Third Question"));
        surveySectionBean.setId(1);
        surveySectionBean.setName("main section");
        surveySectionBean.setShowPanel(Boolean.TRUE);
        surveySectionBean.setStateId(1);
        surveySectionBean.setListQuestions(questionBeanList);
        assertNotNull(surveySectionBean.getId());
        assertNotNull(surveySectionBean.getName());
        assertNotNull(surveySectionBean.getShowPanel());
        assertNotNull(surveySectionBean.getStateId());
        assertNotNull(surveySectionBean.getListQuestions());
    }
View Full Code Here

Examples of org.encuestame.utils.web.UnitSurveySection

     * @param survey
     * @return
     */
  private UnitSurveySection createDefaultSurveySection(final String name,
      final String description, final Survey survey) {
    final UnitSurveySection sectionBean = new UnitSurveySection();
    sectionBean.setDescription(description);
    sectionBean.setName(name);
    return sectionBean;
  }
View Full Code Here

Examples of org.encuestame.utils.web.UnitSurveySection

        "survey.section.name.description.default", request, null);

    // 1- Create survey with possible options
    final Survey surveyDomain = this.newSurvey(surveyBean);
    if (surveyDomain != null) {
      final UnitSurveySection sectionBean = this
          .createDefaultSurveySection(sectionNameDefault, sectionDescDefault, surveyDomain);
      this.newSurveySection(sectionBean, surveyDomain);
      // 2- Create a section by default
    }
    if (surveyBean.getHashTags().size() > 0) {
View Full Code Here

Examples of org.encuestame.utils.web.UnitSurveySection

      // Create survey with section default
      final SurveyBean surveyBean = createSurveyBean("default survey", getSpringSecurityLoggedUserAccount().toString(), new Date());
      final Survey newSurvey = surveyService.createSurvey(surveyBean, this.request);  
     
      // Create new Section
      final UnitSurveySection unitSection = createSurveySection("default 2", "default 2", newSurvey);
      surveyService.createSurveySection(unitSection, newSurvey);
      
     
      // Add another section to survey
      final List<UnitSurveySection> ssection = surveyService.retrieveSectionsBySurvey(newSurvey);
View Full Code Here

Examples of org.encuestame.utils.web.UnitSurveySection

     * @param section
     * @return
     */
    public static final UnitSurveySection convertSurveySectionToSurveySectionBean(
            final SurveySection section) {
        final UnitSurveySection sectionBean = new UnitSurveySection();

        sectionBean.setDescription(section.getDescSection());
        sectionBean.setName(section.getSectionName());

        return sectionBean;
    }
View Full Code Here

Examples of org.encuestame.utils.web.UnitSurveySection

      * @param survey
      * @return
      */
     public UnitSurveySection createSurveySection(final String name,
             final String description, final Survey survey) {
         final UnitSurveySection sectionBean = new UnitSurveySection();
         sectionBean.setDescription(description);
         sectionBean.setName(name);
         return sectionBean;
     }
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.