Ejemplo n.º 1
0
        public void FullMatch_over_tags(string filterString)
        {
            var sut = BookmarkFilter.Create(filterString);

            Bookmark _bookmark = new Bookmark()
            {
                Title = "The quick Brown Fox",
                Tags  = new[] { "tag", "othertag" }
            };

            Assert.True(sut.FilterOnSearchString(_bookmark));
        }
Ejemplo n.º 2
0
        public bool If_more_than_a_single_tag_specified_all_tags_must_match(string filterString)
        {
            var sut = BookmarkFilter.Create(filterString);

            Bookmark _bookmark = new Bookmark()
            {
                Title = "The quick Brown Fox",
                Tags  = new[] { "tag", "othertag" }
            };

            return(sut.FilterOnSearchString(_bookmark));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// applies current filterstring and updates filtered list of bookmarks.
 /// </summary>
 public void ApplyFilter()
 {
     _filterComponent = BookmarkFilter.Create(this.Filter);
 }
Ejemplo n.º 4
0
 public void Throw_if_more_than_a_single_title_token_is_specified()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => BookmarkFilter.Create("test or die"));
 }
Ejemplo n.º 5
0
        public bool PartialMatch_over_title(string filterString)
        {
            var sut = BookmarkFilter.Create(filterString);

            return(sut.FilterOnSearchString(_bookmark));
        }