Пример #1
0
        public void TestGenerateParagraphs()
        {
            string          rawText = Lipsums.LoremIpsum;
            LipsumGenerator lipsum  = new LipsumGenerator(rawText, false);

            int desiredParagraphCount = 5;

            string[] generatedParagraphs = lipsum.
                                           GenerateParagraphs(desiredParagraphCount, Paragraph.Medium);


            Assert.AreEqual(desiredParagraphCount, generatedParagraphs.Length,
                            "Retrieved sentence count mismatch.");

            for (int i = 0; i < desiredParagraphCount; i++)
            {
                Assert.IsNotNull(generatedParagraphs[i],
                                 String.Format("Generated paragraph [{0}] is null.", i));
#if PORTABLE
                Assert.IsNotEmpty(generatedParagraphs[i]);
#else
                StringAssert.IsNonEmpty(generatedParagraphs[i]);
#endif
            }
        }
Пример #2
0
        public void TestGenerateSentences()
        {
            string          rawText = Lipsums.LoremIpsum;
            LipsumGenerator lipsum  = new LipsumGenerator(rawText, false);

            int desiredSentenceCount = 5;

            string[] generatedSentences = lipsum.
                                          GenerateSentences(desiredSentenceCount, Sentence.Medium);

            Assert.AreEqual(desiredSentenceCount, generatedSentences.Length,
                            "Retrieved sentence count mismatch.");

            for (int i = 0; i < desiredSentenceCount; i++)
            {
                Assert.IsNotNull(generatedSentences[i],
                                 String.Format("Generated sentence [{0}] is null.", i));
                StringAssert.IsNonEmpty(generatedSentences[i]);
            }
        }
Пример #3
0
 public void IsNotEmpty()
 {
     StringAssert.IsNonEmpty(" ");
 }
        public void UnpackScriptAsStringReturnsScript()
        {
            string script = ScriptHelper.UnpackEmbeddedScriptAsString("Installation.01.00.00.sql");

            StringAssert.IsNonEmpty(script);
        }
Пример #5
0
 public void IsNotEmptyNullFail()
 {
     StringAssert.IsNonEmpty(null);
 }