/** 测试 通过roleId查询角色信息 */
  @Test
  public void Test_queryPersonRoleInfoById() {
    PersonRoleDaoImpl prdi = new PersonRoleDaoImpl();
    PersonRole pRole = new PersonRole();

    pRole = prdi.queryPersonRoleInfoById(2);
    System.out.println(
        pRole.getRoleId() + "," + pRole.getRoleName() + "," + pRole.getAuthority_RoleId());
  }
  /** 测试 更新会员信息 */
  @Test
  public void Test_updatePersonRole() {
    PersonRoleDaoImpl prdi = new PersonRoleDaoImpl();
    PersonRole pRole = new PersonRole();

    pRole.setRoleId(2);
    pRole.setRoleName("普通会员");
    pRole.setAuthority_RoleId("1,2");

    boolean b = prdi.updatePersonRole(pRole);
    if (b) {
      System.out.println("更新成功");
    } else {
      System.out.println("更新失败");
    }
  }
  /** 测试 遍历全部角色信息 */
  @Test
  public void Test_queryPerosonRoleInfo() {
    PersonRoleDaoImpl prdi = new PersonRoleDaoImpl();

    List<PersonRole> pRoleList = new ArrayList<PersonRole>();

    pRoleList = prdi.queryPerosonRoleInfo();

    for (PersonRole personRole : pRoleList) {
      System.out.println(
          personRole.getRoleId()
              + ","
              + personRole.getRoleName()
              + ","
              + personRole.getAuthority_RoleId());
    }
  }