Ejemplo n.º 1
0
        public void TestCacheCaseInsensitivity()
        {
            using (AnimeListCache cache = new AnimeListCache(expiration: TimeSpan.FromHours(5)))
            {
                cache.PutListForUser("a", new MalUserLookupResults(userId: 5, canonicalUserName: "******", animeList: new List<MyAnimeListEntry>()));

                MalUserLookupResults lookup;
                cache.GetListForUser("A", out lookup);
                Assert.That(lookup.UserId, Is.EqualTo(5));
            }
        }
Ejemplo n.º 2
0
 public CachingMyAnimeListApi(IMyAnimeListApi underlyingApi, TimeSpan?expiration, bool ownApi = false)
 {
     m_underlyingApi    = underlyingApi;
     m_ownUnderlyingApi = ownApi;
     m_cache            = new AnimeListCache(expiration);
 }