Example #1
0
        public async Task GetEntryAsync_TvSeriesId_ReturnsCorrectTvSeries()
        {
            var offlineDb = new OfflineDatabase(GetFolder(), new ConsoleLogger());

            offlineDb.LoadTvSeries();
            var task  = offlineDb.GetEntryAsync(Id.FromTvSeriesNumber(1408), new CancellationToken(), new Progress <double>());
            var entry = await task;

            Assert.IsFalse(task.IsFaulted);
            Assert.IsFalse(Entry.IsNullOrDefault(entry));
            var tv = entry as TvSeries;

            Assert.IsNotNull(tv);
            Assert.AreEqual("House", tv.Name);
        }