"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5-cache/src/test/java/org/apache/hc/client5/http/cache/ManagedHttpCacheStorageTest.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.

ManagedHttpCacheStorageTest.java  (httpcomponents-client-5.2-src):ManagedHttpCacheStorageTest.java  (httpcomponents-client-5.2.1-src)
skipping to change at line 46 skipping to change at line 46
import org.apache.hc.client5.http.impl.cache.ManagedHttpCacheStorage; import org.apache.hc.client5.http.impl.cache.ManagedHttpCacheStorage;
import org.apache.hc.core5.http.HttpStatus; import org.apache.hc.core5.http.HttpStatus;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
class ManagedHttpCacheStorageTest { class ManagedHttpCacheStorageTest {
@Test @Test
void putEntry() throws ResourceIOException { void putEntry() throws ResourceIOException {
final CacheConfig cacheConfig = getCacheConfig(); final CacheConfig cacheConfig = getCacheConfig();
final ManagedHttpCacheStorage cacheStorage = new ManagedHttpCacheStorage try (final ManagedHttpCacheStorage cacheStorage = new ManagedHttpCacheSt
(cacheConfig); orage(cacheConfig)) {
final String key = "foo"; final String key = "foo";
final HttpCacheEntry value = HttpTestUtils.makeCacheEntry(); final HttpCacheEntry value = HttpTestUtils.makeCacheEntry();
cacheStorage.putEntry(key, value); cacheStorage.putEntry(key, value);
assertEquals(HttpStatus.SC_OK, cacheStorage.getEntry(key).getStatus()); assertEquals(HttpStatus.SC_OK, cacheStorage.getEntry(key).getStatus(
));
}
} }
@Test @Test
void isActive() throws ResourceIOException { void isActive() throws ResourceIOException {
final CacheConfig cacheConfig = getCacheConfig(); final CacheConfig cacheConfig = getCacheConfig();
final ManagedHttpCacheStorage cacheStorage = new ManagedHttpCacheStorage (cacheConfig); final ManagedHttpCacheStorage cacheStorage = new ManagedHttpCacheStorage (cacheConfig);
final String key = "foo"; final String key = "foo";
final HttpCacheEntry value = HttpTestUtils.makeCacheEntry(); final HttpCacheEntry value = HttpTestUtils.makeCacheEntry();
cacheStorage.putEntry(key, value); cacheStorage.putEntry(key, value);
 End of changes. 1 change blocks. 
6 lines changed or deleted 8 lines changed or added

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