Package com.google.sitebricks

Examples of com.google.sitebricks.MvelEvaluator


    widget.render(eq(myEmbeddedPage), isA(Respond.class));


    replay(pageBook, page, mockRespond, widget);

    final EmbedWidget embedWidget = new EmbedWidget(Collections.<String, ArgumentWidget>emptyMap(), expression, new MvelEvaluator(), pageBook, pageName);
    embedWidget.init(new EmbeddedRespondFactory(), HtmlTemplateCompilerTest.mockRequestProviderForContext());
    embedWidget
        .render(new MyParentPage(passOn), mockRespond);

View Full Code Here


    widget.render(myEmbeddedPage, mockRespond);


    replay(pageBook, page, mockRespond, widget);

    new EmbedWidget(Collections.<String, ArgumentWidget>emptyMap(), expression, new MvelEvaluator(), pageBook, pageName)
        .render(new MyParentPage(passOn), mockRespond);

    verify(pageBook, page, mockRespond, widget);
  }
View Full Code Here

    widget.render(eq(myEmbeddedPage), isA(Respond.class));


    replay(pageBook, page, mockRespond, widget);

    final EmbedWidget embedWidget = new EmbedWidget(Collections.<String, ArgumentWidget>emptyMap(), expression, new MvelEvaluator(), pageBook, pageName);
    embedWidget.init(new EmbeddedRespondFactory(), HtmlTemplateCompilerTest.mockRequestProviderForContext());
    embedWidget
        .render(new MyParentPage(passOn), mockRespond);

View Full Code Here

        cache.put("strings", boundTo);

        replay(cacheProvider, cache);


        final ChooseWidget widget = new ChooseWidget(new ProceedingWidgetChain(), "from=strings, bind=choice", new MvelEvaluator());
        widget.setCache(cacheProvider);

        widget.render(new HashMap<String, Object>() {{
                    put("strings", boundTo);
                }}, respond);
View Full Code Here

    };
  }

  @Test(dataProvider = ANNOTATION_EXPRESSIONS)
  public final void readAWidgetWithVariousExpressions(String expression) {
    final Evaluator evaluator = new MvelEvaluator();

    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);

    String templateValue = String.format("<html><#if %s><p>hello</p></#if></html>", expression);
View Full Code Here

      protected void configure() {
        bind(HttpServletRequest.class).toProvider(mockRequestProviderForContext());
      }
    });

    final Evaluator evaluator = new MvelEvaluator();

    final WidgetRegistry registry = injector.getInstance(WidgetRegistry.class);


    Renderable widget =
View Full Code Here

    final PageBook pageBook = createMock(PageBook.class);
    final PageBook.Page page = createMock(PageBook.Page.class);
    final Respond respond = RespondersForTesting.newRespond();


    final MvelEvaluator evaluator = new MvelEvaluator();

    final ProceedingWidgetChain widget = new ProceedingWidgetChain();
    final WidgetChain targetWidgetChain = new ProceedingWidgetChain();
    //noinspection unchecked
    targetWidgetChain.addWidget(new XmlWidget(new TerminalWidgetChain(), "p", new MvelEvaluatorCompiler(Object.class), new LinkedHashMap<String, String>() {{
View Full Code Here

    widget.render(eq(myEmbeddedPage), isA(Respond.class));


    replay(pageBook, page, mockRespond, widget);

    final EmbedWidget embedWidget = new EmbedWidget(Collections.<String, ArgumentWidget>emptyMap(), expression, new MvelEvaluator(), pageBook, pageName);
    embedWidget.init(new EmbeddedRespondFactory(RespondersForTesting.newRespond()), HtmlTemplateCompilerTest.mockRequestProviderForContext());
    embedWidget
        .render(new MyParentPage(passOn), mockRespond);

View Full Code Here

    widget.render(myEmbeddedPage, mockRespond);


    replay(pageBook, page, mockRespond, widget);

    new EmbedWidget(Collections.<String, ArgumentWidget>emptyMap(), expression, new MvelEvaluator(), pageBook, pageName)
        .render(new MyParentPage(passOn), mockRespond);


//        assert !passOn.equals(myEmbeddedPage.getMessage()) : "variable somehow set on embedded page";
View Full Code Here

    widget.render(eq(myEmbeddedPage), isA(Respond.class));


    replay(pageBook, page, mockRespond, widget);

    final EmbedWidget embedWidget = new EmbedWidget(Collections.<String, ArgumentWidget>emptyMap(), expression, new MvelEvaluator(), pageBook, pageName);
    embedWidget.init(new EmbeddedRespondFactory(RespondersForTesting.newRespond()), HtmlTemplateCompilerTest.mockRequestProviderForContext());
    embedWidget
        .render(new MyParentPage(passOn), mockRespond);

View Full Code Here

TOP

Related Classes of com.google.sitebricks.MvelEvaluator

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.