Exemple #1
0
            public void before_each_test_setup()
            {
                TargetContainer = new SummarizationInformationContainer();

                TargetAnalyzedDocument = new AnalyzedDocument
                {
                    ScoredSentences = TargetContainer.ScoredSentences,
                    ScoredTextUnits = TargetContainer.ScoredTextUnits
                };

                TargetContentSummarizer = Substitute.For <IContentSummarizer>();
                TargetContentSummarizer.GetConcepts(Arg.Any <AnalyzedDocument>(), Arg.Any <ISummarizerArguments>()).Returns(new List <string>()
                {
                    "concept"
                });
                TargetContentSummarizer.GetSentences(Arg.Any <AnalyzedDocument>(), Arg.Any <ISummarizerArguments>()).Returns(new List <string>()
                {
                    "sentence"
                });

                TargetSummarizerArguments = Substitute.For <ISummarizerArguments>();
            }
Exemple #2
0
 public void throws_if_IContentSummarizer_GetSentences_returns_null()
 {
     TargetContentSummarizer.GetSentences(Arg.Any <AnalyzedDocument>(), Arg.Any <ISummarizerArguments>()).Returns((List <string>)null);
     Assert.That(() => Target.SummarizeAnalysedContent(TargetAnalyzedDocument, TargetContentSummarizer, TargetSummarizerArguments), Throws.TypeOf <InvalidOperationException>());
 }
Exemple #3
0
 public void throws_if_IContentSummarizer_GetSentences_returns_null()
 {
     TargetContentSummarizer.GetSentences(Arg.Any <AnalyzedDocument>(), Arg.Any <ISummarizerArguments>()).Returns((List <string>)null);
     Target.SummarizeAnalysedContent(TargetAnalyzedDocument, TargetContentSummarizer, TargetSummarizerArguments);
 }