Package com.google.sitebricks.rendering.resource

Examples of com.google.sitebricks.rendering.resource.ResourcesService


  @Test
  public final void dispatchStaticResource() throws IOException {
    final HttpServletRequest request = createMock(HttpServletRequest.class);
    PageBook pageBook = createMock(PageBook.class);
    RequestBinder binder = createMock(RequestBinder.class);
    ResourcesService resourcesService = createMock(ResourcesService.class);
    Respond mockRespond = createMock(Respond.class);

    @SuppressWarnings("unchecked")
    Provider<Respond> respond = createMock(Provider.class);


    expect(request.getRequestURI())
        .andReturn(A_STATIC_RESOURCE_URI)
        .anyTimes();

    expect(request.getContextPath())
        .andReturn("")
        .anyTimes();

    expect(resourcesService.serve(A_STATIC_RESOURCE_URI))
        .andReturn(mockRespond);

    replay(request, pageBook, respond, binder, resourcesService);

    Respond out = new WidgetRoutingDispatcher(pageBook, binder, respond, resourcesService,
View Full Code Here

TOP

Related Classes of com.google.sitebricks.rendering.resource.ResourcesService

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.