Examples of AttributeMatcher


Examples of com.volantis.styling.impl.engine.matchers.AttributeMatcher

     */
    public void testNullLocalNameFails() {
        try {
            ValueConstraint constraint = new ValueConstraintMock(
                    "constraintMock", expectations);
            new AttributeMatcher(null, null, constraint);
            fail("Null localName not detected");
        } catch (IllegalArgumentException e) {
            assertEquals("Error message incorrect",
                         "localName cannot be null",
                         e.getMessage());
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.AttributeMatcher

    /**
     * Test that a null constraintMock fails.
     */
    public void testNullConstraintFails() {
        try {
            new AttributeMatcher(null, "fred", null);
            fail("Null constraintMock not detected");
        } catch (IllegalArgumentException e) {
            assertEquals("Error message incorrect",
                         "constraint cannot be null",
                         e.getMessage());
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.AttributeMatcher

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        Matcher matcher = new AttributeMatcher(null, "local", constraintMock);
        MatcherResult actual = matcher.matches(matcherContextMock);
        assertEquals("Wrong result", MatcherResult.MATCHED, actual);
    }
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.AttributeMatcher

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        Matcher matcher = new AttributeMatcher(null, "local", constraintMock);
        MatcherResult actual = matcher.matches(matcherContextMock);
        assertEquals("Wrong result", MatcherResult.FAILED, actual);
    }
View Full Code Here

Examples of com.volantis.styling.impl.engine.matchers.AttributeMatcher

    }

    // Javadoc inherited.
    public SimpleMatcher createAttributeMatcher(String prefix, String localName,
                                                ValueConstraint constraint) {
        return new AttributeMatcher(prefix, localName, constraint);
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.dom.AttributeMatcher

  {
    final MatcherContext context = new MatcherContext();
    context.setMatchSubReportChilds(false);

    NodeMatcher m = new AndMatcher(new ElementMatcher(LabelType.INSTANCE),
        new AttributeMatcher(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.LABEL_FOR, field));
    ReportElement match = ReportStructureMatcher.match(context, titleHeader, m);
    if (match == null)
    {
      if (titleHeader.getElementCount() > 0)
      {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.selector.AttributeMatcher

    //ModelPrinter.print(logicalPageBox);

    final NodeMatcher matcher = new ChildMatcher(new ElementMatcher("TableCellRenderBox"));
    final RenderNode[] all = MatchFactory.matchAll(logicalPageBox, matcher);

    final NodeMatcher childMatcher = new AndMatcher(new ElementMatcher("ParagraphRenderBox"), new AttributeMatcher("value"));
    assertEquals(6, all.length);
    for (final RenderNode renderNode : all)
    {
      final RenderNode node = MatchFactory.match(renderNode, childMatcher);
      assertNotNull(node);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.testsupport.selector.AttributeMatcher

  }

  private RenderNode findTextFieldsWithField(String field, RenderNode itemBand)
  {
    final ElementTypeMatcher typeMatcher = new ElementTypeMatcher(TextFieldType.INSTANCE.getMetaData().getName());
    final AttributeMatcher attributeMatcher = new AttributeMatcher(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, field);
    final AndMatcher m = new AndMatcher(typeMatcher, attributeMatcher);
    return MatchFactory.match(itemBand, m);
  }
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.