Пример #1
0
        public void TestExtractHashTagsFromList()
        {
            var tags = TagsProcessor.ExtractHashTagsFromValue(new TagsProcessorTest.Test3(), "Name", "Description");

            var exp = new[] { "tag1", "tag2", "tag3", "tag4", "tag5" };

            Assert.Equal(exp.Length, tags.Length);
            for (int i = 0; i < exp.Length; i++)
            {
                Assert.Equal(exp[i], tags[i]);
            }
        }
        public void TestExtractHashTagsFromListObjects()
        {
            var tags = TagsProcessor.ExtractHashTagsFromValue(new TagsProcessorTest.Test5(), "Pages");

            var exp = new[] { "tag1", "tag2", "tag3", "tag4", "tag5" };

            Assert.Equal(exp.Length, tags.Length);
            for (int i = 0; i < exp.Length; i++)
            {
                Assert.Equal(exp[i], tags[i]);
            }
        }