Exemple #1
0
        public void TestRemoveBookmark()
        {
            var collection = new BookmarkCollection(_bookmarks.Object, TimeSpan.Zero);

            collection.AddDataSource(_dataSource.Object);

            _logSource.AddEntry("", LevelFlags.Error);
            _logSource.AddEntry("", LevelFlags.Error);

            var bookmark = collection.TryAddBookmark(_dataSource.Object, 1);

            _bookmarks.Verify(x => x.SaveAsync(), Times.Once);

            collection.RemoveBookmark(bookmark);
            _bookmarks.Verify(x => x.SaveAsync(), Times.Exactly(2));
            collection.Bookmarks.Should().BeEmpty();
        }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="bookmark"></param>
 public void RemoveBookmark(Bookmark bookmark)
 {
     _bookmarks.RemoveBookmark(bookmark);
 }