public void before_each_test_setup() { TargetContainer = new SummarizationInformationContainer(); TargetParsedDocument = new ParsedDocument(); TargetParsedDocument.Sentences = new List <Sentence>() { TargetContainer.Sentence }; TargetContentAnalyzer = Substitute.For <IContentAnalyzer>(); TargetContentAnalyzer.GetImportantTextUnits(Arg.Any <List <Sentence> >()).Returns(TargetContainer.ScoredTextUnits); TargetContentAnalyzer.ScoreSentences(Arg.Any <List <Sentence> >(), Arg.Any <List <TextUnitScore> >()).Returns(TargetContainer.ScoredSentences); }
public void throws_if_IContentAnalyzer_GetImportantTextUnits_returns_null() { TargetContentAnalyzer.GetImportantTextUnits(Arg.Any <List <Sentence> >()).Returns((List <TextUnitScore>)null); Assert.That(() => Target.AnalyzeParsedContent(TargetParsedDocument, TargetContentAnalyzer), Throws.TypeOf <InvalidOperationException>()); }
public void throws_if_IContentAnalyzer_GetImportantTextUnits_returns_null() { TargetContentAnalyzer.GetImportantTextUnits(Arg.Any <List <Sentence> >()).Returns((List <TextUnitScore>)null); Target.AnalyzeParsedContent(TargetParsedDocument, TargetContentAnalyzer); }