Package org.springside.examples.showcase.common.entity

Examples of org.springside.examples.showcase.common.entity.Role


    //准备数据
    User user = new User();
    user.setLoginName("admin");
    user.setShaPassword(new ShaPasswordEncoder().encodePassword("admin", null));
    Role role1 = new Role();
    role1.setName("admin");
    Role role2 = new Role();
    role2.setName("user");
    user.getRoleList().add(role1);
    user.getRoleList().add(role2);

    //录制脚本
    EasyMock.expect(mockAccountManager.findUserByLoginName("admin")).andReturn(user);
View Full Code Here


    return user;
  }

  public static User getRandomUserWithAdminRole() {
    User user = UserData.getRandomUser();
    Role adminRole = UserData.getAdminRole();
    user.getRoleList().add(adminRole);
    return user;
  }
View Full Code Here

    user.getRoleList().add(adminRole);
    return user;
  }

  public static Role getAdminRole() {
    Role role = new Role();
    role.setId("1");
    role.setName("Admin");

    return role;
  }
View Full Code Here

TOP

Related Classes of org.springside.examples.showcase.common.entity.Role

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.