org.sonatype.nexus.repository.view.handlers.TimingHandler Java Examples

The following examples show how to use org.sonatype.nexus.repository.view.handlers.TimingHandler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CocoapodsProxyRecipeTest.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Before
public void setup() throws Exception
{
  AttributesMap attributesMap = new AttributesMap();
  attributesMap.set(LOCAL_ATTRIBUTE_PREFIX + "some_key", "some_value");
  when(context.getRepository()).thenReturn(repository);
  when(context.getAttributes()).thenReturn(attributesMap);
  when(request.getAction()).thenReturn(HttpMethods.GET);
  when(viewFacet.get()).thenReturn(cocoapodsViewFacet);
  when(format.getValue()).thenReturn(COCOAPODS_NAME);
  timingHandler = spy(new TimingHandler(null));

  underTest = new CocoapodsProxyRecipe(new ProxyType(), format);
  underTest.timingHandler = timingHandler;
  underTest.securityFacet = securityFacet;
  underTest.viewFacet = viewFacet;
  underTest.securityHandler = securityHandler;
  underTest.routingHandler = routingHandler;
  underTest.exceptionHandler = exceptionHandler;
  underTest.negativeCacheHandler = negativeCacheHandler;
  underTest.conditionalRequestHandler = conditionalRequestHandler;
  underTest.partialFetchHandler = partialFetchHandler;
  underTest.contentHeadersHandler = ontentHeadersHandler;
  underTest.unitOfWorkHandler = unitOfWorkHandler;
  underTest.lastDownloadedHandler = lastDownloadedHandler;
  underTest.proxyHandler = proxyHandler;
  underTest.httpClientFacet = httpClientFacet;
  underTest.negativeCacheFacet = negativeCacheFacet;
  underTest.proxyFacet = proxyFacet;
  underTest.cocoapodsFacet = cocoapodsFacet;
  underTest.storageFacet = storageFace;
  underTest.attributesFacet = attributesFacet;
  underTest.componentMaintenance = componentMaintenance;
  underTest.searchFacet = searchFacet;
  underTest.purgeUnusedFacet = purgeUnusedFacet;
  underTest.highAvailabilitySupportHandler = highAvailabilitySupportHandler;
  underTest.highAvailabilitySupportChecker = highAvailabilitySupportChecker;
  underTest.handlerContributor = handlerContributor;

  underTest.apply(repository);
  cocoapodsViewFacet.attach(repository);
}