Пример #1
0
 public HomeController()
 {
     restfulClient            = new RESTfulClient();
     graphQLClient            = new GraphQLClient();
     personMailGraphVMCreator = new CorrespondenceAnalysisVMCreator();
     elasticSearchClient      = new ElasticSearchClient(personMailGraphVMCreator, restfulClient);
 }
Пример #2
0
        public ElasticSearchClient(CorrespondenceAnalysisVMCreator personMailGraphVMCreator, RESTfulClient restClient)
        {
            var settings = new ConnectionSettings(new Uri(ApplicationConstant.urlElasticSearchService))
                           .DefaultIndex(ApplicationConstant.elastcSearchIndex);

            elasticClient   = new ElasticClient(settings);
            this.restClient = restClient;
            this.personMailGraphVMCreator = personMailGraphVMCreator;
        }
Пример #3
0
        public void PersonMailGraphVMCreatorValuesTest()
        {
            var mailRecords = CreateListOfMailRecord();

            var resultFromPersonMailGraphVMCreator = new CorrespondenceAnalysisVMCreator()
                                                     .CreateFromMailRecords(mailRecords);

            CheckMailsGraphCorrectness(resultFromPersonMailGraphVMCreator.MailsGraph);
            CheckPersonGraphCorrectness(resultFromPersonMailGraphVMCreator.PersonsGraph);
            CheckMailsTableCorrectness(resultFromPersonMailGraphVMCreator.MailsTable);
        }