示例#1
0
        public void CanStripLyricMarkerWhenSummarizing()
        {
            var text    = $"#{RandomValueGenerator.AlphaNumericTextWithSpaces(10, 20)}\n#{RandomValueGenerator.AlphaNumericTextWithSpaces(10, 20)}";
            var newText = TextManipulations.Summarize(text);

            Assert.IsFalse(newText.Contains('#'));
        }
示例#2
0
        public void CanStripSectionsWhenSummarizing()
        {
            var section = $"[{RandomValueGenerator.AlphaNumericText(10, 20)}]";
            var text    = $"{RandomValueGenerator.AlphaNumericTextWithSpaces(10, 20)}\n{section}";
            var newText = TextManipulations.Summarize(text);

            Assert.IsFalse(newText.Contains(section));
        }
示例#3
0
        public void CanStripAnnotationsWhenSummarizing()
        {
            var annotation = $"!{RandomValueGenerator.AlphaNumericTextWithSpaces(10, 20)}";
            var text       = $"{annotation}\n{RandomValueGenerator.AlphaNumericTextWithSpaces(10, 20)}";
            var newText    = TextManipulations.Summarize(text);

            Assert.IsFalse(newText.Contains('!'));
            Assert.IsFalse(newText.Contains(annotation.Substring(1)));
        }
示例#4
0
        public void CanStripChordsWhenSummarizing()
        {
            var chords  = $"@{RandomValueGenerator.AlphaNumericTextWithSpaces(10, 20)}";
            var text    = $"{chords}\n{RandomValueGenerator.AlphaNumericTextWithSpaces(10, 20)}";
            var newText = TextManipulations.Summarize(text);

            Assert.IsFalse(newText.Contains('@'));
            Assert.IsFalse(newText.Contains(chords.Substring(1)));
        }