コード例 #1
0
        public void PreTagAndPostTagCanBeSet()
        {
            var highlight = new Highlight { PreTag = "Pre", PostTag = "Post" };

            Assert.Equal("Pre", highlight.PreTag);
            Assert.Equal("Post", highlight.PostTag);
        }
コード例 #2
0
        public void ConstructorHasSensibleDefaultValues()
        {
            var highlight = new Highlight();

            Assert.Null(highlight.PreTag);
            Assert.Null(highlight.PostTag);
            Assert.Empty(highlight.Fields);
        }
コード例 #3
0
        public void AddFieldsAddsFields()
        {
            var highlight = new Highlight();

            highlight.AddFields("field1", "field2");

            Assert.Contains("field1", highlight.Fields);
            Assert.Contains("field2", highlight.Fields);
            Assert.Equal(2, highlight.Fields.Count);
        }