Package org.sonatype.nexus.componentviews

Examples of org.sonatype.nexus.componentviews.HandlerContext


  @Test
  public void binariesFoundLocallyAreStreamed() throws Exception {
    ViewRequest request = mockRequest(PATH, HttpMethod.GET);

    HandlerContext context = mock(HandlerContext.class);
    when(context.getRequest()).thenReturn(request);

    final RawBinary localBinary = mock(RawBinary.class);
    when(localBinary.getPath()).thenReturn(PATH);

    when(store.getForPath(PATH)).thenReturn(asList(localBinary));
View Full Code Here


  }

  @Test
  public void notFoundLocallyCallsSource() throws Exception {
    ViewRequest request = mockRequest(PATH, HttpMethod.GET);
    HandlerContext context = mock(HandlerContext.class);
    when(context.getRequest()).thenReturn(request);

    // There's no matching local raw binary
    when(store.getForPath(PATH)).thenReturn(Collections.<RawBinary>emptyList());

    final ComponentEnvelope<RawComponent, RawAsset> mockComponent = mock(ComponentEnvelope.class);
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.componentviews.HandlerContext

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.