Package org.sete.domain

Examples of org.sete.domain.SeteUser


        cspVo.setCreator("1");
        cspVo.setPartner("2");
        cspVo.setSponsor("3");
        cspVo.setCategory("biology");

        SeteUser creator = new SeteUser();
        creator.setId(Integer.valueOf(cspVo.getCreator()));

        SeteUser partner = new SeteUser();
        partner.setId(Integer.valueOf(cspVo.getPartner()));

        SeteUser sponsor = new SeteUser();
        sponsor.setId(Integer.valueOf(cspVo.getSponsor()));

        EasyMock.expect(mockScienceProjectDao.isStudentInAnotherProject(
                                    Integer.valueOf(cspVo.getCreator()))).andReturn(Boolean.FALSE);

        EasyMock.expect(mockUserDao.findById(Integer.valueOf(cspVo.getCreator()))).andReturn(creator);
View Full Code Here


        scienceProjectService.createNewScienceProject(cspVo);
    }
   
    private void primeProjectWithStudentandSponsor(ScienceProject p){
        SeteUser stud = new SeteUser();
        stud.setId(studentId);
        SeteUser sponsor = new SeteUser();
        sponsor.setId(sponsorId);
        Set<SeteUser> students = new HashSet<SeteUser>();
        students.add(stud);
        p.setStudents(students);
        p.setSponsor(sponsor);
    }
View Full Code Here

     * Tests that a non-null and size 2 list is returned for a project with 2 forms.
     */
    public void testLoadAllScienceProjectsSponsoredByBadSponsor(){
        int toTestID = 2;
        int badID = 5;
        SeteUser p = new SeteUser();
        p.setId(badID);
        EasyMock.expect(mockUserDao.findById(new Integer(toTestID))).andReturn(p);
        EasyMock.replay(mockUserDao);
        List<ScienceProjectVo> att = scienceProjectService.loadAllScienceProjectsSponsoredBy(toTestID);
        assertEquals(true,att.isEmpty());
    }
View Full Code Here

    /**
     * Tests that a non-null and size 2 list is returned for a project with 2 forms.
     */
    public void testLoadAllScienceProjectsSponsoredByNoProjects(){
        int toTestID = 2;
        SeteUser p = new SeteUser();
        p.setId(toTestID);
        List<ScienceProject> projects = new ArrayList<ScienceProject>();
        EasyMock.expect(mockScienceProjectDao.findSponsoredBy(p)).andReturn(projects);
        EasyMock.replay(mockScienceProjectDao);
        EasyMock.expect(mockUserDao.findById(new Integer(toTestID))).andReturn(p);
        EasyMock.replay(mockUserDao);
View Full Code Here

        assertEquals(true,att.isEmpty());
    }
    //1 project found
    public void testLoadAllScienceProjectsSponsoredByOneProjects(){
        int toTestID = 2;
        SeteUser p = new SeteUser();
        p.setId(toTestID);
        List<ScienceProject> projects = new ArrayList<ScienceProject>();
        ScienceProject proj = new ScienceProject();
        projects.add(proj);
        ScienceProjectCategoryType t = new ScienceProjectCategoryType();
        t.setLabel("");
        Set<SeteUser> students = new HashSet<SeteUser>();
        SeteUser stud = new SeteUser();
        stud.setFirstName("");
        stud.setLastName("");
        students.add(stud);
        proj.setStudents(students);
        proj.setScienceProjectCategoryType(t);
        EasyMock.expect(mockScienceProjectDao.findSponsoredBy(p)).andReturn(projects);
        EasyMock.replay(mockScienceProjectDao);
View Full Code Here

        CreateScienceProjectVo cspVo = new CreateScienceProjectVo();
        cspVo.setCreator("1");
        cspVo.setSponsor("3");
        cspVo.setCategory("physics");

        SeteUser creator = new SeteUser();
        creator.setId(Integer.valueOf(cspVo.getCreator()));

        SeteUser sponsor = new SeteUser();
        sponsor.setId(Integer.valueOf(cspVo.getSponsor()));

        EasyMock.expect(mockScienceProjectDao.isStudentInAnotherProject(
                                    Integer.valueOf(cspVo.getCreator()))).andReturn(Boolean.FALSE);

        EasyMock.expect(mockUserDao.findById(Integer.valueOf(cspVo.getCreator()))).andReturn(creator);
View Full Code Here

        cspVo.setCreator("1");
        cspVo.setPartner("2");
        cspVo.setSponsor("3");
        cspVo.setCategory("biology");

        SeteUser creator = new SeteUser();
        creator.setId(Integer.valueOf(cspVo.getCreator()));

        SeteUser partner = new SeteUser();
        partner.setId(Integer.valueOf(cspVo.getPartner()));

        SeteUser sponsor = new SeteUser();
        sponsor.setId(Integer.valueOf(cspVo.getSponsor()));

        EasyMock.expect(mockScienceProjectDao.isStudentInAnotherProject(
                                    Integer.valueOf(cspVo.getCreator()))).andReturn(Boolean.FALSE);

        EasyMock.expect(mockUserDao.findById(Integer.valueOf(cspVo.getCreator()))).andReturn(creator);
View Full Code Here

     * Tests that a non-null and size 2 list is returned for a project with 2 forms.
     */
    public void testLoadAllScienceProjectsSponsoredByBadSponsor(){
        int toTestID = 2;
        int badID = 5;
        SeteUser p = new SeteUser();
        p.setId(badID);
        EasyMock.expect(mockUserDao.findById(new Integer(toTestID))).andReturn(p);
        EasyMock.replay(mockUserDao);
        List<ScienceProjectVo> att = scienceProjectService.loadAllScienceProjectsSponsoredBy(toTestID);
        assertEquals(true,att.isEmpty());
    }
View Full Code Here

    /**
     * Tests that a non-null and size 2 list is returned for a project with 2 forms.
     */
    public void testLoadAllScienceProjectsSponsoredByNoProjects(){
        int toTestID = 2;
        SeteUser p = new SeteUser();
        p.setId(toTestID);
        List<ScienceProject> projects = new ArrayList<ScienceProject>();
        EasyMock.expect(mockScienceProjectDao.findSponsoredBy(p)).andReturn(projects);
        EasyMock.replay(mockScienceProjectDao);
        EasyMock.expect(mockUserDao.findById(new Integer(toTestID))).andReturn(p);
        EasyMock.replay(mockUserDao);
View Full Code Here

        assertEquals(true,att.isEmpty());
    }
    //1 project found
    public void testLoadAllScienceProjectsSponsoredByOneProjects(){
        int toTestID = 2;
        SeteUser p = new SeteUser();
        p.setId(toTestID);
        List<ScienceProject> projects = new ArrayList<ScienceProject>();
        ScienceProject proj = new ScienceProject();
        projects.add(proj);
        ScienceProjectCategoryType t = new ScienceProjectCategoryType();
        t.setLabel("");
        Set<SeteUser> students = new HashSet<SeteUser>();
        SeteUser stud = new SeteUser();
        stud.setFirstName("");
        stud.setLastName("");
        students.add(stud);
        proj.setStudents(students);
        proj.setScienceProjectCategoryType(t);
        EasyMock.expect(mockScienceProjectDao.findSponsoredBy(p)).andReturn(projects);
        EasyMock.replay(mockScienceProjectDao);
View Full Code Here

TOP

Related Classes of org.sete.domain.SeteUser

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.