public void Update_RemovedEntries_RemoveMissingItems(
            SubtitleStateEntry[] entries,
            SubtitleState state)
        {
            var failedFiles = entries.Skip(1).Select(e => e.File);
            state.Entries.Clear();
            state.Entries.AddRange(entries);

            state.Update(failedFiles);

            Assert.That(state.Entries.Select(e => e.File), Is.EquivalentTo(failedFiles));
        }
        public void Update_NewEntries_AddNewEntries(
            SubtitleStateEntry[] newEntries,
            SubtitleStateEntry[] existingEntries,
            SubtitleState state)
        {
            var failedFiles = existingEntries.Concat(newEntries).Select(e => e.File);
            state.Entries.Clear();
            state.Entries.AddRange(existingEntries);

            state.Update(failedFiles);

            Assert.That(state.Entries.Select(e => e.File), Is.EquivalentTo(failedFiles));
        }
        public void Update_ExistingEntriesMatching_LeaveExistingItemsUnchanged(
            SubtitleStateEntry[] entries,
            SubtitleState state
            )
        {
            var failedFiles = entries.Select(e => e.File);
            state.Entries.Clear();
            state.Entries.AddRange(entries);

            state.Update(failedFiles);

            Assert.That(entries.Select(e => new { e.File, e.Timestamp }),
                Is.EquivalentTo(state.Entries.Select(e => new { e.File, e.Timestamp })));
        }