Ejemplo n.º 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);
            }
Ejemplo n.º 2
0
 public void calls_IContentAnalyzer_ScoreSentences_with_parsed_document_sentences_and_returning_scored_text_units()
 {
     Target.AnalyzeParsedContent(TargetParsedDocument, TargetContentAnalyzer);
     TargetContentAnalyzer.Received(1).ScoreSentences(TargetParsedDocument.Sentences, TargetContainer.ScoredTextUnits);
 }
Ejemplo n.º 3
0
 public void calls_IContentAnalyzer_GetImportantTextUnits_with_parsed_document_sentences()
 {
     Target.AnalyzeParsedContent(TargetParsedDocument, TargetContentAnalyzer);
     TargetContentAnalyzer.Received(1).GetImportantTextUnits(TargetParsedDocument.Sentences);
 }
Ejemplo n.º 4
0
 public void throws_if_IContentAnalyzer_ScoreSentences_returns_null()
 {
     TargetContentAnalyzer.ScoreSentences(Arg.Any <List <Sentence> >(), Arg.Any <List <TextUnitScore> >()).Returns((List <SentenceScore>)null);
     Assert.That(() => Target.AnalyzeParsedContent(TargetParsedDocument, TargetContentAnalyzer), Throws.TypeOf <InvalidOperationException>());
 }
Ejemplo n.º 5
0
 public void throws_if_IContentAnalyzer_ScoreSentences_returns_null()
 {
     TargetContentAnalyzer.ScoreSentences(Arg.Any <List <Sentence> >(), Arg.Any <List <TextUnitScore> >()).Returns((List <SentenceScore>)null);
     Target.AnalyzeParsedContent(TargetParsedDocument, TargetContentAnalyzer);
 }