Package net.sf.pmr.core.domain.user

Examples of net.sf.pmr.core.domain.user.User


  }

  public final void testAddShouldNotThrowConcurrencyFailureException() throws Exception {

    // get a new User
    User user = CoreObjectFactory.getUser();
    User user2 = CoreObjectFactory.getUser();

    user.setLogin("sdoo");
    user.setPassword("password");
    user.setFirstName("scooby");
    user.setLastName("doo");
    user.setEmail("scooby@worldCompany.com");

    user2.setLogin("sdoo");
    user2.setPassword("password2");
    user2.setFirstName("scooby2");
    user2.setLastName("doo2");
    user2.setEmail("scooby2@worldCompany.com");

    //add
    userMapper.addOrUpdate(user);

    try {
View Full Code Here


  public final void testUpdateWithoutConcurrencyFailureException()
      throws Exception {

    // load a user
    User user = (User) userMapper.findById(2);

    // change password
    user.setPassword("motdepasse");

    //save user
    userMapper.addOrUpdate(user);

    //    check
View Full Code Here

   * test l'ajout de la relation user <- (member) -> basicProject
   * @throws Exception
   */
  public final void testAddWithAProject() throws Exception {
   
    User user = new UserImpl();
    Project basicProject = new ProjectImpl();
   
    user.setLogin("sdoo");
    user.setPassword("password");
    user.setFirstName("scooby");
    user.setLastName("doo");
    user.setEmail("scooby@worldCompany.com");
 
   
    basicProject.setPersistanceId(1);
    basicProject.setCode("PR1");
    basicProject.setName("PM Project");
    basicProject.setPersistanceVersion(1);
   
    user.setProjects(new HashSet<Project>());
    user.getProjects().add(basicProject);

    // add
    userMapper.addOrUpdate(user);
       
    // check
View Full Code Here

  public final void testUpdateWithConcurrencyFailureException()
      throws Exception {

 
    // load a user
    User user1 = (User) userMapper.findById(2);
    User user2 = (User) userMapper.findById(2);

    // change password
    user1.setPassword("motdepasse");
    user2.setPassword("monpassword");

    //save user
    userMapper.addOrUpdate(user1);

    try {
View Full Code Here

      throws Exception {

 

    // load a user
    User user = (User) userMapper.findById(2);

    //delete user
    userMapper.delete(user);

    //    check
View Full Code Here

  public final void testDeleteWithConcurrencyFailureException()
      throws Exception {
 

    // load a user
    User user1 = (User) userMapper.findById(2);
    User user2 = (User) userMapper.findById(2);

    //delete user
    userMapper.delete(user1);

    try {
View Full Code Here

 
   
    // find all user data from database
    List list = userMapper.findAll();
   
    User user = (User) list.get(0);
   
    user.getCompany();
   
   
    // check
    String query = "select * FROM PMUSER";

View Full Code Here

     
         Project project = new ProjectImpl();
       
        Date date = new Date();
       
        User owner = new UserImpl();
       
        // les descriptions sont différentes
        toDo1.setPersistanceId(1);
        toDo1.setDate(date);
        toDo1.setDescription("première description");
View Full Code Here

      project2.setCode("code2");
      project2.setName("name2");
        
        Date date = new Date();
       
        User owner = new UserImpl();
       
        // les descriptions sont différentes
        toDo1.setPersistanceId(1);
        toDo1.setDate(date);
        toDo1.setDescription("description");
View Full Code Here

         project.setName("name1");
        
        Date date1 = new Date();
        Date date2 = new Date();
       
        User owner1 = new UserImpl();
        owner1.setLogin("login1");
       
        User owner2 = new UserImpl();
        owner2.setLogin("login2");
       
        // les owner sont différents
        toDo1.setPersistanceId(1);
        toDo1.setDate(date1);
        toDo1.setDescription("description");
View Full Code Here

TOP

Related Classes of net.sf.pmr.core.domain.user.User

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.