Package org.pentaho.platform.security.userroledao.ws

Examples of org.pentaho.platform.security.userroledao.ws.ProxyPentahoRole


  @Test
  public void testCreateRole() throws Exception {
    UserRoleDaoMock userRoleDao = PentahoSystem.get( UserRoleDaoMock.class, USER_ROLE_DAO_TXN, null );

    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoRole role = new ProxyPentahoRole( "role" );
    role.setDescription( "testing" );
    try {
      service.createRole( role );
      Assert.fail();
    } catch ( UserRoleException e ) {
      Assert.assertTrue( "ERROR_0001 not found in " + e.getMessage(), e.getMessage().indexOf( "ERROR_0001" ) >= 0 );
View Full Code Here


  @Test
  public void testDeleteRoles() throws Exception {
    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoRole[] rolesObj = new ProxyPentahoRole[1];
    rolesObj[0] = new ProxyPentahoRole( "testRole1" );
    try {
      service.deleteRoles( rolesObj );
      Assert.fail();
    } catch ( UserRoleException e ) {
      Assert.assertTrue( "ERROR_0001 not found in " + e.getMessage(), e.getMessage().indexOf( "ERROR_0001" ) >= 0 );
View Full Code Here

  }

  @Test
  public void testGetUsersForRole() throws UserRoleException {
    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoRole roleObj = new ProxyPentahoRole( "testRole1" );
    try {
      service.getUsersForRole( roleObj );
      Assert.fail();
    } catch ( UserRoleException e ) {
      Assert.assertTrue( "ERROR_0001 not found in " + e.getMessage(), e.getMessage().indexOf( "ERROR_0001" ) >= 0 );
View Full Code Here

    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoUser userObj = new ProxyPentahoUser();
    userObj.setName( "test1" );

    ProxyPentahoRole[] rolesObj = new ProxyPentahoRole[1];
    rolesObj[0] = new ProxyPentahoRole( "testRole2" );

    try {
      service.setRoles( userObj, rolesObj );
      Assert.fail();
    } catch ( UserRoleException e ) {
View Full Code Here

  @Test
  public void testSetUsers() throws UserRoleException {
    UserRoleDaoMock userRoleDao = PentahoSystem.get( UserRoleDaoMock.class, USER_ROLE_DAO_TXN, null );

    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoRole roleObj = new ProxyPentahoRole( "testRole1" );

    ProxyPentahoUser[] usersObj = new ProxyPentahoUser[1];
    usersObj[0] = new ProxyPentahoUser();
    usersObj[0].setName( "test2" );
View Full Code Here

  @Test
  public void testUpdateRoleObject() throws UserRoleException {
    UserRoleDaoMock userRoleDao = PentahoSystem.get( UserRoleDaoMock.class, USER_ROLE_DAO_TXN, null );

    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoRole roleObj = new ProxyPentahoRole( "testRole1" );
    roleObj.setDescription( "testUpdateRoleObject" );

    try {
      service.updateRoleObject( roleObj );
      Assert.fail();
    } catch ( UserRoleException e ) {
View Full Code Here

  @Test
  public void testUpdateRole() throws UserRoleException {
    UserRoleDaoMock userRoleDao = PentahoSystem.get( UserRoleDaoMock.class, USER_ROLE_DAO_TXN, null );

    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoRole roleObj = new ProxyPentahoRole( "testRole1" );
    roleObj.setDescription( "testUpdateRoleObject" );
    List<String> usernames = new ArrayList<String>();
    try {
      service.updateRole( "testRole1", "testUpdateRoleObject", usernames );
      Assert.fail();
    } catch ( UserRoleException e ) {
View Full Code Here

TOP

Related Classes of org.pentaho.platform.security.userroledao.ws.ProxyPentahoRole

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.