private TestFeatureResourceLoader(ResourceMock resourceMock) { super(null, new TimeSource(), new DefaultFeatureFileSystem()); this.resourceMock = resourceMock; }
/** * Create a new TtlCache with the given capacity and TTL values. * The cache provider provides an implementation of the actual storage. * * @param cache The underlying cache that will store actual data. */ public SoftExpiringCache(Cache<K, V> cache) { this.cache = cache; expirationTimes = new MapMaker().weakKeys().makeMap(); timeSource = new TimeSource(); }
/** * Create a new TtlCache with the given capacity and TTL values. * The cache provider provides an implementation of the actual storage. * * @param cache The underlying cache that will store actual data. */ public SoftExpiringCache(Cache<K, V> cache) { this.cache = cache; expirationTimes = new MapMaker().weakKeys().makeMap(); timeSource = new TimeSource(); }
/** * Create a new TtlCache with the given capacity and TTL values. * The cache provider provides an implementation of the actual storage. * * @param cache The underlying cache that will store actual data. */ public SoftExpiringCache(Cache<K, V> cache) { this.cache = cache; expirationTimes = new MapMaker().weakKeys().makeMap(); timeSource = new TimeSource(); }
/** * Create a new TtlCache with the given capacity and TTL values. * The cache provider provides an implementation of the actual storage. * * @param cache The underlying cache that will store actual data. */ public SoftExpiringCache(Cache<K, V> cache) { this.cache = cache; expirationTimes = new MapMaker().weakKeys().makeMap(); timeSource = new TimeSource(); }
/** * Create a new TtlCache with the given capacity and TTL values. * The cache provider provides an implementation of the actual storage. * * @param cache The underlying cache that will store actual data. */ public SoftExpiringCache(Cache<K, V> cache) { this.cache = cache; expirationTimes = new MapMaker().weakKeys().makeMap(); timeSource = new TimeSource(); }
@Test public void testOAuthFetcherConfig() { BlobCrypter crypter = mock(BlobCrypter.class); mock(HttpCache.class); GadgetOAuthTokenStore tokenStore = mock(GadgetOAuthTokenStore.class); OAuthCallbackGenerator callbackGenerator = mock(OAuthCallbackGenerator.class); OAuthFetcherConfig config = new OAuthFetcherConfig(crypter, tokenStore, new TimeSource(), callbackGenerator, false); assertEquals(crypter, config.getStateCrypter()); assertEquals(tokenStore, config.getTokenStore()); assertEquals(callbackGenerator, config.getOAuthCallbackGenerator()); assertFalse(config.isViewerAccessTokensEnabled()); } }
@Test public void testOAuthFetcherConfig() { BlobCrypter crypter = mock(BlobCrypter.class); mock(HttpCache.class); GadgetOAuthTokenStore tokenStore = mock(GadgetOAuthTokenStore.class); OAuthCallbackGenerator callbackGenerator = mock(OAuthCallbackGenerator.class); OAuthFetcherConfig config = new OAuthFetcherConfig(crypter, tokenStore, new TimeSource(), callbackGenerator, false); assertEquals(crypter, config.getStateCrypter()); assertEquals(tokenStore, config.getTokenStore()); assertEquals(callbackGenerator, config.getOAuthCallbackGenerator()); assertFalse(config.isViewerAccessTokensEnabled()); } }
@Test public void testOAuthFetcherConfig() { BlobCrypter crypter = mock(BlobCrypter.class); mock(HttpCache.class); GadgetOAuthTokenStore tokenStore = mock(GadgetOAuthTokenStore.class); OAuthCallbackGenerator callbackGenerator = mock(OAuthCallbackGenerator.class); OAuthFetcherConfig config = new OAuthFetcherConfig(crypter, tokenStore, new TimeSource(), callbackGenerator, false); assertEquals(crypter, config.getStateCrypter()); assertEquals(tokenStore, config.getTokenStore()); assertEquals(callbackGenerator, config.getOAuthCallbackGenerator()); assertFalse(config.isViewerAccessTokensEnabled()); } }