Examples of UnitAttachment


Examples of org.encuestame.utils.web.UnitAttachment

    /**
     * Test {@link UnitAttachment}
     */
    @Test
    public void testUnitAttachment(){
        final UnitAttachment attachmentBean = new UnitAttachment();
        final UnitProjectBean projectBean = createProjectBean("", 2L, 1L);
        final File myFile =  new File("/uri/");
        attachmentBean.setAttachmentId(1L);
        attachmentBean.setFile(myFile);
        attachmentBean.setFilename("attachFile");
        attachmentBean.setProjectBean(projectBean);
        attachmentBean.setUploadDate(new Date());

        assertNotNull(attachmentBean.getAttachmentId());
        assertNotNull(attachmentBean.getFile());
        assertNotNull(attachmentBean.getFilename());
        assertNotNull(attachmentBean.getProjectBean());
        assertNotNull(attachmentBean.getUploadDate());
    }
View Full Code Here

Examples of org.encuestame.utils.web.UnitAttachment

      * @param projectBean
      * @return
      */
     public UnitAttachment createUnitAttachment(final String filename, final Date uploadDate,
                            final UnitProjectBean projectBean){
        final UnitAttachment unitAttachmentBean = new UnitAttachment();
        unitAttachmentBean.setFilename(filename);
        unitAttachmentBean.setProjectBean(projectBean);
        unitAttachmentBean.setUploadDate(uploadDate);
        return unitAttachmentBean;
     }
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.