"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestProtocolRecommendations.java" between
httpcomponents-client-5.2-src.tar.gz and httpcomponents-client-5.2.1-src.tar.gz

About: Apache HttpComponents Client provides reusable components for client-side authentication, HTTP state management, and HTTP connection management. Java sources.

TestProtocolRecommendations.java  (httpcomponents-client-5.2-src):TestProtocolRecommendations.java  (httpcomponents-client-5.2.1-src)
skipping to change at line 280 skipping to change at line 280
resp1.setHeader(validatorHeader, validator); resp1.setHeader(validatorHeader, validator);
resp1.setHeader("Content-Range", "bytes 0-127/256"); resp1.setHeader("Content-Range", "bytes 0-127/256");
Mockito.when(mockExecChain.proceed(Mockito.any(), Mockito.any())).thenRe turn(resp1); Mockito.when(mockExecChain.proceed(Mockito.any(), Mockito.any())).thenRe turn(resp1);
final ClassicHttpRequest req2 = HttpTestUtils.makeDefaultRequest(); final ClassicHttpRequest req2 = HttpTestUtils.makeDefaultRequest();
req2.setHeader("If-Range", validator); req2.setHeader("If-Range", validator);
req2.setHeader("Range","bytes=0-127"); req2.setHeader("Range","bytes=0-127");
req2.setHeader(conditionalHeader, validator); req2.setHeader(conditionalHeader, validator);
final ClassicHttpResponse resp2 = new BasicClassicHttpResponse(HttpStatu try (final ClassicHttpResponse resp2 = new BasicClassicHttpResponse(Http
s.SC_NOT_MODIFIED, "Not Modified"); Status.SC_NOT_MODIFIED, "Not Modified")) {
resp2.setHeader("Date", DateUtils.formatStandardDate(now)); resp2.setHeader("Date", DateUtils.formatStandardDate(now));
resp2.setHeader(validatorHeader, validator); resp2.setHeader(validatorHeader, validator);
}
// cache module does not currently deal with byte ranges, but we want // cache module does not currently deal with byte ranges, but we want
// this test to work even if it does some day // this test to work even if it does some day
execute(req1); execute(req1);
final ClassicHttpResponse result = execute(req2); final ClassicHttpResponse result = execute(req2);
final ArgumentCaptor<ClassicHttpRequest> reqCapture = ArgumentCaptor.for Class(ClassicHttpRequest.class); final ArgumentCaptor<ClassicHttpRequest> reqCapture = ArgumentCaptor.for Class(ClassicHttpRequest.class);
Mockito.verify(mockExecChain, Mockito.atMost(2)).proceed(reqCapture.capt ure(), Mockito.any()); Mockito.verify(mockExecChain, Mockito.atMost(2)).proceed(reqCapture.capt ure(), Mockito.any());
 End of changes. 1 change blocks. 
4 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)