Пример #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>();
            }
Пример #2
0
 public void throws_if_IContentSummarizer_GetConcepts_returns_null()
 {
     TargetContentSummarizer.GetConcepts(Arg.Any <AnalyzedDocument>(), Arg.Any <ISummarizerArguments>()).Returns((List <string>)null);
     Assert.That(() => Target.SummarizeAnalysedContent(TargetAnalyzedDocument, TargetContentSummarizer, TargetSummarizerArguments), Throws.TypeOf <InvalidOperationException>());
 }
Пример #3
0
 public void throws_if_IContentSummarizer_GetConcepts_returns_null()
 {
     TargetContentSummarizer.GetConcepts(Arg.Any <AnalyzedDocument>(), Arg.Any <ISummarizerArguments>()).Returns((List <string>)null);
     Target.SummarizeAnalysedContent(TargetAnalyzedDocument, TargetContentSummarizer, TargetSummarizerArguments);
 }