Exemple #1
0
        static void Main(string[] args)
        {
            var paragraph = MussumGenerator.GetRandomParagraphs(ParagraphSize.Short, 1);

            Console.WriteLine(paragraph);
            Console.ReadKey();
        }
Exemple #2
0
        public void GetRandomParagraphs_TestNumberParagraphs()
        {
            var paragraphsNumber = new int[] { 1, 3, 5, 8, 10 };

            foreach (var number in paragraphsNumber)
            {
                string text = MussumGenerator.GetRandomParagraphs(ParagraphSize.Any, number);

                int paragraphsNumberResult = Regex.Matches(text, "\n\n").Count + 1;

                Assert.AreEqual(paragraphsNumberResult, number);
            }
        }