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 } }
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]); } }
public void IsNotEmpty() { StringAssert.IsNonEmpty(" "); }
public void UnpackScriptAsStringReturnsScript() { string script = ScriptHelper.UnpackEmbeddedScriptAsString("Installation.01.00.00.sql"); StringAssert.IsNonEmpty(script); }
public void IsNotEmptyNullFail() { StringAssert.IsNonEmpty(null); }