Exemple #1
0
        public void TestIsOneHeaderOneTag()
        {
            var outline = new Outline();

            outline.SetHeader("# One ");
            var result = outline.GetTags();

            Assert.Single(result.ToArray());
        }
Exemple #2
0
        public void TestIsOneHeaderTwoTagReplace()
        {
            var outline = new Outline();

            outline.SetHeader("# One Two");
            outline.SetHeader("# OneA TwoA");
            var result = outline.GetTags();

            Assert.Equal(2, result.Length);
            Assert.Equal("OneA", result[0]);
            Assert.Equal("TwoA", result[1]);
        }
Exemple #3
0
        public void TestIsLevelThreeOnly()
        {
            var outline = new Outline();

            outline.SetHeader(" ### One Two");

            var result = outline.GetTags();

            Assert.Equal(2, result.Length);
            Assert.Equal("One", result[0]);
            Assert.Equal("Two", result[1]);
        }
Exemple #4
0
        public void TestIsTwoHeaderTwoReplace()
        {
            var outline = new Outline();

            outline.SetHeader("# One Two");
            outline.SetHeader("## OneB TwoB");
            outline.SetHeader("# OneC TwoC");
            var result = outline.GetTags();

            Assert.Equal(2, result.Length);
            Assert.Equal("OneC", result[0]);
            Assert.Equal("TwoC", result[1]);
        }
Exemple #5
0
        public void TestIsTwoHeaderTwo()
        {
            var outline = new Outline();

            outline.SetHeader("# One Two");
            outline.SetHeader("## OneB TwoB");
            var result = outline.GetTags();

            Assert.Equal(4, result.Length);
            Assert.Equal("One", result[0]);
            Assert.Equal("Two", result[1]);
            Assert.Equal("OneB", result[2]);
            Assert.Equal("TwoB", result[3]);
        }