Package org.encuestame.utils.json

Examples of org.encuestame.utils.json.FolderBean


    /**
     * Test {@link FolderBean}
     */
    @Test
    public void testFolderBean(){
        FolderBean folderBean = new FolderBean();
        folderBean.setId(2L);
        folderBean.setCreateAt(new Date());
        folderBean.setFolderName("My folder");
        assertNotNull(folderBean);
        assertNotNull(folderBean.getId());
        assertNotNull(folderBean.getCreateAt());
        assertNotNull(folderBean.getFolderName());
    }
View Full Code Here


     * Test create survey folder.
     * @throws EnMeNoResultsFoundException
     */
    @Test
    public void testCreateSurveyFolder() throws EnMeNoResultsFoundException {
        final FolderBean fbean = surveyService.createSurveyFolder(
                "My First Folder", getSpringSecurityLoggedUserAccount()
                        .getUsername());
        Assert.assertNotNull(fbean);
    }
View Full Code Here

     * Test get surveys by folder.
     * @throws EnMeExpcetion
     */
    @Test
    public void testGetSurveysByFolder() throws EnMeExpcetion{
        final FolderBean fbean = surveyService.createSurveyFolder(
                "My First Folder", this.myUsername);
        Assert.assertNotNull(fbean);
        final SurveyBean mySurveyBean = createSurveyBean("My Second survey",
                this.myUsername, this.mySurveyDate.getTime());
        final Survey mySurvey = surveyService.createSurvey(mySurveyBean, this.request);
        surveyService.addSurveyToFolder(fbean.getId(), this.myUsername,
                mySurvey.getSid());
        final List<Survey> listSurvey = surveyService.retrieveSurveyByFolder(
                getSpringSecurityLoggedUserAccount().getAccount().getUid(),
                fbean.getId());
        assertEquals("should be equals", 1, listSurvey.size());
    }
View Full Code Here

     * @param folder
     * @return
     */
    public static final FolderBean convertFolderToBeanFolder(
            final IFolder folder) {
        final FolderBean unitFolder = new FolderBean();
        unitFolder.setCreateAt(folder.getCreatedAt());
        unitFolder.setFolderName(folder.getFolderName());
        unitFolder.setId(folder.getId());
        return unitFolder;
    }
View Full Code Here

      * @param createdAt
      * @param folderName
      * @return
      */
     public FolderBean createFolderBean(final Date createdAt, final String folderName){
        final FolderBean fbean = new FolderBean();
        fbean.setCreateAt(createdAt);
        fbean.setFolderName(folderName);
        return fbean;
     }
View Full Code Here

TOP

Related Classes of org.encuestame.utils.json.FolderBean

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.