Package se.gu.fire.data

Examples of se.gu.fire.data.AssignmentManager


    }

    public TestBean(EntityManager entMan) {
        this.entMan = entMan;

        assignMan = new AssignmentManager();
        subMan = new SubmissionManager();
        userMan = new UserManager();
        groupMan = new GroupManager();
        comMan = new CommentManager();
        passMan = new PasswordManager();
View Full Code Here


        testBean.clearDb();
    }

    @Test
    public void testAssignment() {
        AssignmentManager am = new AssignmentManager();
        am.setEntityManager(em);
       
       
       
        Assignment assign = new Assignment.Builder()
                .title("Ratnum labb")
                .information("Programmera RatNum labben ordentligt annars kommer Christopher.")
                .finalDeadline(new Date(Calendar.getInstance().getTime().getTime()+15000))
                .firstDeadline(new Date(Calendar.getInstance().getTime().getTime()+10000))
                .build();
           
        em.getTransaction().begin();
        am.create(assign);
        em.getTransaction().commit();
       
        Assignment assign2 = am.read(assign.getId());
        assertEquals(assign, assign2);
    }
View Full Code Here

    @Test
    public void testingSubmissions() {

        // Create the managers
        AssignmentManager am = new AssignmentManager();
        am.setEntityManager(em);

        SubmissionManager sm = new SubmissionManager();
        sm.setEntityManager(em);

        UserManager um = new UserManager();
        um.setEntityManager(em);

        GroupManager gm = new GroupManager();
        gm.setEntityManager(em);

        CommentManager cm = new CommentManager();
        cm.setEntityManager(em);

        // Fix assignment
        Assignment assign = new Assignment.Builder()
                .title("Ratnum labb")
                .information("Programmera RatNum labben ordentligt annars kommer Christopher.")
                .finalDeadline(new Date(Calendar.getInstance().getTime().getTime()+15000))
                .firstDeadline(new Date(Calendar.getInstance().getTime().getTime()+10000))
                .build();
           
        em.getTransaction().begin();
        am.create(assign);
        em.getTransaction().commit();


        // Fix users
        FireUser u = TestUtil.createRandomUser();
View Full Code Here

TOP

Related Classes of se.gu.fire.data.AssignmentManager

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.