Beispiel #1
0
            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);
            }
Beispiel #2
0
 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>());
 }
Beispiel #3
0
 public void throws_if_IContentAnalyzer_GetImportantTextUnits_returns_null()
 {
     TargetContentAnalyzer.GetImportantTextUnits(Arg.Any <List <Sentence> >()).Returns((List <TextUnitScore>)null);
     Target.AnalyzeParsedContent(TargetParsedDocument, TargetContentAnalyzer);
 }