Examples of DebugExpressionRuntime


Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-2.prpt"));
    // save it twice, that triggers the crash...
    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-2.prpt"));

    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DebugExpressionRuntime runtime = new DebugExpressionRuntime(new DefaultTableModel(), 0, processingContext);

    final Element reportElement = (Element) report2.getReportHeader().getElement(0);
    final Object designValue = reportElement.getElementType().getDesignValue(runtime, reportElement);
    final DefaultImageReference image = (DefaultImageReference) designValue;
    assertEquals(20, image.getImageWidth());
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-disk-2.prpt"));
    // save it twice, that triggers the crash...
    saveReport(report2, new File("bin/test-tmp/prd-3159-load-save-disk-2.prpt"));

    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DebugExpressionRuntime runtime = new DebugExpressionRuntime(new DefaultTableModel(), 0, processingContext);

    final Element reportElement = (Element) report2.getPageHeader().getElement(4);
    final Object designValue = reportElement.getElementType().getDesignValue(runtime, reportElement);
    final DefaultImageReference image = (DefaultImageReference) designValue;
    assertEquals(456, image.getImageWidth());
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    DataRow r = Mockito.mock(DataRow.class);
    Mockito.when(r.get("number")).thenReturn(new Double(123456.78901));
    Mockito.when(r.get("date")).thenReturn(new Date(1234567890123l));

    return new DebugExpressionRuntime(r, new DefaultTableModel(), 0, pc);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    saveReport(report2, new File("bin/test-tmp/prd-3319-load-save-disk-2.prpt"));
    // save it twice, that triggers the crash...
    saveReport(report2, new File("bin/test-tmp/prd-3319-load-save-disk-2.prpt"));

    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DebugExpressionRuntime runtime = new DebugExpressionRuntime(new DefaultTableModel(), 0, processingContext);

    final Element reportElement = report2.getReportHeader().getElement(0);
    Object attribute = reportElement.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE);

    assertTrue(attribute instanceof ResourceKey);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    builder.initialize(new DefaultProcessingContext(), parentBox, renderNodeFactory);
    builder.startSection();

    ReportFooter reportFooter = new ReportFooter();
    reportFooter.setComputedStyle(new SimpleStyleSheet(reportFooter.getDefaultStyleSheet()));
    builderStrategy.add(new DebugExpressionRuntime(), builder, reportFooter, new ArrayList<InlineSubreportMarker>());
    builderStrategy.add(new DebugExpressionRuntime(), builder, reportFooter, new ArrayList<InlineSubreportMarker>());
    builderStrategy.add(new DebugExpressionRuntime(), builder, reportFooter, new ArrayList<InlineSubreportMarker>());

    builder.endSection();

    assertEquals(3, countChilds((RenderBox) parentBox.getFirstChild()));
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    final BSHExpression ex = new BSHExpression();
    ex.setExpression("");

    final DefaultProcessingContext processingContext = new DefaultProcessingContext();

    ex.setRuntime(new DebugExpressionRuntime
        (new DefaultTableModel(), 0, processingContext));
    assertNull(ex.getValue());
    // must not crash
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    final PageFormat pageFormat = new PageFormat();
    pageFormat.setPaper(fmFactory.createPaper((double) sequence.getPageWidth(), 1000));

    final SimplePageDefinition pageDefinition = new SimplePageDefinition(pageFormat);
    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DebugExpressionRuntime runtime = new DebugExpressionRuntime(new DefaultTableModel(), 0, processingContext);

    final TableDebugOutputProcessor outputProcessor = new TableDebugOutputProcessor(metaData);
    final TableDebugRenderer flowRenderer = new TableDebugRenderer(outputProcessor);
    final MasterReport report = new MasterReport();
    report.setPageDefinition(pageDefinition);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    final TableModel table = new DefaultTableModel(new Object[]{"Column"}, 100);

    final TableDataFactory tdf = new TableDataFactory();
    tdf.addTable("query", table);

    DebugExpressionRuntime rt = new DebugExpressionRuntime()
    {
      public DataFactory getDataFactory()
      {
        return tdf;
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    e.getStyle().setStyleProperty(ElementStyleKeys.PADDING_LEFT, 5f);
    e.getStyle().setStyleProperty(ElementStyleKeys.PADDING_RIGHT, 5f);
    e.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, 8);
    e.getStyle().setStyleProperty(TextStyleKeys.FONT, "Tahoma");

    final Object value = e.getElementType().getValue(new DebugExpressionRuntime(), e);
    assertTrue(value instanceof BarcodeWrapper);
    final BarcodeWrapper w = (BarcodeWrapper) value;
    w.setStyleSheet(e.getStyle());
    final Barcode barcode = w.getBarcode();
    final Field barWidth = Barcode.class.getDeclaredField("barWidth");
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.DebugExpressionRuntime

    ClassicEngineBoot.getInstance().start();
  }

  public void testPieURL() throws Exception
  {
    DebugExpressionRuntime runtime = new DebugExpressionRuntime();
    FormulaPieURLGenerator gen = new FormulaPieURLGenerator(runtime, "=[chart::item]");

    DefaultPieDataset dataSet = new DefaultPieDataset();
    dataSet.setValue("Key-1", 5);
    dataSet.setValue("Key-2", 7);
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.