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

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


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

    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoUser user = new ProxyPentahoUser();
    user.setName( "test" );
    user.setEnabled( true );
    user.setPassword( "test" );
    user.setDescription( "testing" );
    try {
      service.createUser( user );
      Assert.fail();
    } catch ( UserRoleException e ) {
      Assert.assertTrue( "ERROR_0001 not found in " + e.getMessage(), e.getMessage().indexOf( "ERROR_0001" ) >= 0 );
View Full Code Here


      Assert.assertTrue( "ERROR_0001 not found in " + e.getMessage(), e.getMessage().indexOf( "ERROR_0001" ) >= 0 );
    }

    isAdmin = true;

    ProxyPentahoUser userObj = service.getUser( "test1" );

    Assert.assertNotNull( userObj );
    Assert.assertEquals( "test1", userObj.getName() );

  }
View Full Code Here

  @Test
  public void testDeleteUsers() throws Exception {
    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoUser[] usersObj = new ProxyPentahoUser[1];
    usersObj[0] = new ProxyPentahoUser();
    usersObj[0].setName( "test1" );
    try {
      service.deleteUsers( usersObj );
      Assert.fail();
    } catch ( UserRoleException e ) {
View Full Code Here

  }

  @Test
  public void testGetRolesForUser() throws UserRoleException {
    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoUser userObj = new ProxyPentahoUser();
    userObj.setName( "test1" );
    try {
      service.getRolesForUser( userObj );
      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 testSetRoles() throws UserRoleException {
    UserRoleDaoMock userRoleDao = PentahoSystem.get( UserRoleDaoMock.class, USER_ROLE_DAO_TXN, null );

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

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

    try {
View Full Code Here

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

    ProxyPentahoUser[] usersObj = new ProxyPentahoUser[1];
    usersObj[0] = new ProxyPentahoUser();
    usersObj[0].setName( "test2" );

    try {
      service.setUsers( roleObj, usersObj );
      Assert.fail();
View Full Code Here

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

    IUserRoleWebService service = getUserRoleWebService();
    ProxyPentahoUser userObj = new ProxyPentahoUser();
    userObj.setName( "test1" );
    userObj.setDescription( "testUpdateUser" );
    userObj.setPassword( "newpass" );

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

TOP

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

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.