コード例 #1
0
        public void DateSenseManipulator_Remove_Empty()
        {
            string input = "1818{ds||||}";

            // ACT
            var output = new DateSenseManipulator().RemoveMarkup(input);

            // ASSERT
            output.ShouldBe("1818");
        }
コード例 #2
0
        public void DateSenseManipulator_Replace_NoLast()
        {
            string input = "14th century{ds|i|1||}";

            // ACT
            var output = new DateSenseManipulator().ReplaceMarkup(input);

            // ASSERT
            output.ShouldBe("14th century, defined at sense (intransitive) <b class=\"mw-b\">1</b>");
        }
コード例 #3
0
        public void DateSenseManipulator_Replace_NoVerb()
        {
            string input = "1818{ds||1|a|}";

            // ACT
            var output = new DateSenseManipulator().ReplaceMarkup(input);

            // ASSERT
            output.ShouldBe("1818, defined at sense <b class=\"mw-b\">1</b>a");
        }
コード例 #4
0
        public void DateSenseManipulator_Remove_NoLast()
        {
            string input = "14th century{ds|i|1||}";

            // ACT
            var output = new DateSenseManipulator().RemoveMarkup(input);

            // ASSERT
            output.ShouldBe("14th century");
        }
コード例 #5
0
        public void DateSenseManipulator_Replace_Full()
        {
            string input = "before 12th century{ds|t|1|a|1}";

            // ACT
            var output = new DateSenseManipulator().ReplaceMarkup(input);

            // ASSERT
            output.ShouldBe("before 12th century, defined at sense (transitive) <b class=\"mw-b\">1</b>a(1)");
        }
コード例 #6
0
        public void DateSenseManipulator_Replace_OnlySenseNumber()
        {
            string input = "circa 1530{ds||2||}";

            // ACT
            var output = new DateSenseManipulator().ReplaceMarkup(input);

            // ASSERT
            output.ShouldBe("circa 1530, defined at sense <b class=\"mw-b\">2</b>");
        }
コード例 #7
0
        public void DateSenseManipulator_Remove_OnlySenseNumber()
        {
            string input = "circa 1530{ds||2||}";

            // ACT
            var output = new DateSenseManipulator().RemoveMarkup(input);

            // ASSERT
            output.ShouldBe("circa 1530");
        }
コード例 #8
0
        public void DateSenseManipulator_Remove_Full()
        {
            string input = "before 12th century{ds|t|1|a|1}";

            // ACT
            var output = new DateSenseManipulator().RemoveMarkup(input);

            // ASSERT
            output.ShouldBe("before 12th century");
        }