Package org.pentaho.reporting.designer.testsupport

Examples of org.pentaho.reporting.designer.testsupport.TestReportDesignerContext.addMasterReport()


    final MasterReport report = new MasterReport();
    final CrosstabElement element = new CrosstabElement();
    report.getReportHeader().addElement(element);

    final TestReportDesignerContext rdc = new TestReportDesignerContext();
    rdc.addMasterReport(report);
    rdc.addSubReport((ReportDocumentContext) rdc.getDocumentContext(0), element);
    rdc.setActiveDocument(rdc.getDocumentContext(1));
    final ReportDocumentContext activeContext = rdc.getActiveContext();
    Assert.assertNotNull(activeContext);
    Assert.assertEquals(activeContext.getReportDefinition(), element);
View Full Code Here


    final MasterReport report = new MasterReport();
    final SubReport element = new SubReport();
    report.getReportHeader().addElement(element);

    final TestReportDesignerContext rdc = new TestReportDesignerContext();
    rdc.addMasterReport(report);
    rdc.addSubReport((ReportDocumentContext) rdc.getDocumentContext(0), element);
    rdc.setActiveDocument(rdc.getDocumentContext(1));
    final ReportDocumentContext activeContext = rdc.getActiveContext();
    Assert.assertNotNull(activeContext);
    Assert.assertEquals(activeContext.getReportDefinition(), element);
View Full Code Here

    final MasterReport report = new MasterReport();
    report.setRootGroup(new CrosstabGroup());

    final TestReportDesignerContext rdc = new TestReportDesignerContext();
    rdc.addMasterReport(report);
    rdc.setActiveDocument(rdc.getDocumentContext(0));
    final ReportDocumentContext activeContext = rdc.getActiveContext();
    Assert.assertNotNull(activeContext);
    Assert.assertEquals(activeContext.getReportDefinition(), report);
View Full Code Here

    final MasterReport report = new MasterReport();
    CrosstabGroup rootGroup = new CrosstabGroup();
    report.setRootGroup(rootGroup);

    final TestReportDesignerContext rdc = new TestReportDesignerContext();
    rdc.addMasterReport(report);
    rdc.setActiveDocument(rdc.getDocumentContext(0));
    final ReportDocumentContext activeContext = rdc.getActiveContext();
    Assert.assertNotNull(activeContext);
    Assert.assertEquals(activeContext.getReportDefinition(), report);
View Full Code Here

    final CrosstabElement element = new CrosstabElement();
    Group rootGroup = element.getRootGroup();
    report.getReportHeader().addElement(element);

    final TestReportDesignerContext rdc = new TestReportDesignerContext();
    rdc.addMasterReport(report);
    rdc.addSubReport((ReportDocumentContext) rdc.getDocumentContext(0), element);
    rdc.setActiveDocument(rdc.getDocumentContext(1));
    final ReportDocumentContext activeContext = rdc.getActiveContext();
    Assert.assertNotNull(activeContext);
    Assert.assertEquals(activeContext.getReportDefinition(), element);
View Full Code Here

    element.setRootGroup(relGroup);

    report.getReportHeader().addElement(element);

    final TestReportDesignerContext rdc = new TestReportDesignerContext();
    rdc.addMasterReport(report);
    rdc.addSubReport((ReportDocumentContext) rdc.getDocumentContext(0), element);
    rdc.setActiveDocument(rdc.getDocumentContext(1));
    final ReportDocumentContext activeContext = rdc.getActiveContext();
    Assert.assertNotNull(activeContext);
    Assert.assertEquals(activeContext.getReportDefinition(), element);
View Full Code Here

    final Element mrLabel2 = TableTestUtil.createDataItem("Label2");
    report.getPageHeader().addElement(mrLabel2);

    final TestReportDesignerContext designerContext = new TestReportDesignerContext();
    final int idx = designerContext.addMasterReport(report);
    final ReportRenderContext masterContext = designerContext.getReportRenderContext(idx);

    final SharedElementRenderer sharedRenderer = masterContext.getSharedRenderer();
    assertTrue(sharedRenderer.performLayouting());
View Full Code Here

    final Element mrLabel2 = TableTestUtil.createDataItem("Label2");
    report.getPageHeader().addElement(mrLabel2);

    final TestReportDesignerContext designerContext = new TestReportDesignerContext();
    final int idx = designerContext.addMasterReport(report);
    final ReportRenderContext masterContext = designerContext.getReportRenderContext(idx);

    final SharedElementRenderer sharedRenderer = masterContext.getSharedRenderer();
    final StopWatch w = StopWatch.startNew();
    run(mrLabel2, sharedRenderer);
View Full Code Here

    report.getReportHeader().addElement(elementX);

    // setup a dummy environment that simulates the setup of a full prd
    final ReportDesignerContext rdc = new TestReportDesignerContext();
    rdc.addMasterReport(report);
    final ReportRenderContext activeContext = rdc.getReportRenderContext(0);
    rdc.setActiveDocument(activeContext);
    assertNotNull(activeContext);

    // use the style editor panel in isolation to make the whole process debuggable ..
View Full Code Here

  @Test
  public void testActionInit() throws Exception
  {
    TestReportDesignerContext designerContext = new TestReportDesignerContext();
    int i = designerContext.addMasterReport(new MasterReport());
    designerContext.setActiveDocument(designerContext.getDocumentContext(i));

    final TestAction crosstabAction = new TestAction();
    crosstabAction.setReportDesignerContext(designerContext);
    Assert.assertNotNull(crosstabAction.getSelectionModel());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.