Example #1
0
 public void Build_GivenWhitespaceTitle_ThrowsArgumentOutOfRangeException()
 {
     Assert.Throws <ArgumentOutOfRangeException>(
         () => InterpretationSection.Build(" ", new List <string> {
         "Paragraph 1"
     }));
 }
Example #2
0
 public void Build_GivenEmptyParagraphsList_ThrowsArgumentOutOfRangeException()
 {
     Assert.Throws <ArgumentException>(
         () => InterpretationSection.Build("Title", new List <string>()));
 }
Example #3
0
 public void Build_GivenNullParagraphsList_ThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(
         () => InterpretationSection.Build("Title", null));
 }
Example #4
0
 private static string GetParagraphsText(InterpretationSection section)
 {
     return(section.Paragraphs.Aggregate(string.Empty, (current, parapraph)
                                         => current + parapraph + Environment.NewLine + Environment.NewLine));
 }