SetEntryTagList() public method

public SetEntryTagList ( int entryId, IList tags ) : bool
entryId int
tags IList
return bool
Esempio n. 1
0
        public void GetGetTopTags()
        {
            UnitTestHelper.SetupBlog();
            var repository = new DatabaseObjectProvider();
            Entry entry = UnitTestHelper.CreateEntryInstanceForSyndication("test", "the title for this post", "test");
            UnitTestHelper.Create(entry);
            repository.SetEntryTagList(entry.Id, new List<string>(new[] { "tag1", "tag2", "tag3" }));

            entry = UnitTestHelper.CreateEntryInstanceForSyndication("test", "the title for this post",
                                                                     @"<a href=""http://blah/tag3/"" rel=""tag"">test</a>");
            UnitTestHelper.Create(entry);

            ICollection<Tag> topTags = repository.GetMostUsedTags(1);
            Assert.AreEqual("tag3", topTags.First().TagName);
        }