Package org.pentaho.platform.api.engine

Examples of org.pentaho.platform.api.engine.ISecurityHelper


    super.tearDown();
    SecurityHelper.setMockInstance( null );
  }

  public void testMakeContentFinderHandlesXmlaEnablement() throws Exception {
    ISecurityHelper securityHelper = mock( ISecurityHelper.class );
    SecurityHelper.setMockInstance( securityHelper );
    when( securityHelper.runAsSystem( any( ( Callable.class ) ) ) ).thenReturn( DATASOURCE_XML );

    Document content =
        XmlDom4JHelper.getDocFromString(
            new PentahoXmlaServlet().makeContentFinder( "fakeurl" ).getContent(),
            new PentahoEntityResolver() );
View Full Code Here


    assertNotNull( content.selectNodes(
        "/DataSources/DataSource/Catalogs/Catalog[@name='FoodMart']" ) );
  }

  public void testInvalidDataSourceInfo() throws Exception {
    ISecurityHelper securityHelper = mock( ISecurityHelper.class );
    SecurityHelper.setMockInstance( securityHelper );
    when( securityHelper.runAsSystem( any( ( Callable.class ) ) ) ).thenReturn(
        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
            + "<DataSources>\n"
            + "<DataSource>\n"
            + "<DataSourceName>Pentaho</DataSourceName>\n"
            + "<DataSourceDescription>Pentaho BI Platform Datasources</DataSourceDescription>\n"
View Full Code Here

    String jobId = "jobId";

    Job mockJob = mock( Job.class );
    doReturn( mockJob ).when( schedulerService ).getJob( jobId );

    ISecurityHelper mockSecurityHelper = mock( ISecurityHelper.class );
    doReturn( mockSecurityHelper ).when( schedulerService ).getSecurityHelper();

    IPentahoSession mockPentahoSession = mock( IPentahoSession.class );
    doReturn( mockPentahoSession ).when( schedulerService ).getSession();
View Full Code Here

    String jobId = "jobId";

    Job mockJob = mock( Job.class );
    doReturn( mockJob ).when( schedulerService ).getJob( jobId );

    ISecurityHelper mockSecurityHelper = mock( ISecurityHelper.class );
    doReturn( mockSecurityHelper ).when( schedulerService ).getSecurityHelper();

    IPentahoSession mockPentahoSession = mock( IPentahoSession.class );
    doReturn( mockPentahoSession ).when( schedulerService ).getSession();
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.ISecurityHelper

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.