Package org.springmodules.prevayler.test.domain

Examples of org.springmodules.prevayler.test.domain.ManagerImpl.addManagedEmployee()


       
        OfficeImpl o2 = new OfficeImpl("o1", "Office 1");
        ManagerImpl m2 = new ManagerImpl("m1");
        EmployeeImpl e2 = new EmployeeImpl("e1");
        e2.setOffice(o2);
        m2.addManagedEmployee(e2);
        m2.setOffice(o2);
       
        assertNull(o2.getId());
        assertNull(m2.getId());
        assertNull(e2.getId());
View Full Code Here


        ManagerImpl man1 = new ManagerImpl("m1");
        man1 = (ManagerImpl) this.prevalentSystem.save(man1);
       
        // Create an employee and add it to the manager:
        EmployeeImpl emp1 = new EmployeeImpl("a1");
        man1.addManagedEmployee(emp1);
        // Update the manager and save the employee by cascade:
        man1 = (ManagerImpl) this.prevalentSystem.update(man1);
       
        // Verify that the id has been set:
        assertNotNull(emp1.getId());
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.