Ejemplo n.º 1
0
        public async Task GlobalSetup()
        {
            LaunchSettingsReader.Read();

            _rabbitMqSettings      = RabbitMqSettingsReader.Read();
            _rabbitMqConfiguration = new RabbitMqVhostInitializer(_rabbitMqSettings);

            await _rabbitMqConfiguration.InitializeAsync();
        }
        public async Task GlobalSetup()
        {
            LaunchSettingsReader.Read();

            _rabbitMqSettings    = RabbitMqSettingsReader.Read();
            _rabbitMqInitializer = new RabbitMqVhostInitializer(_rabbitMqSettings);

            await _rabbitMqInitializer.InitializeAsync();

            _settingsMock = new SettingsMock(_pathToSettings);

            var prepareSettings = new AppSettings
            {
                Db = new DbSettings
                {
                    AzureDataConnString = "empty",
                    LogsConnString      = "empty",
                    MaxTransactionsSavingParallelism = 4
                },
                RabbitMq = new RabbitMqSettings
                {
                    ConnString             = _rabbitMqSettings.GetConnectionString(),
                    MessageConsumersCount  = 1,
                    MessageProcessorsCount = 1,
                    TransactionsBatchSize  = 2
                },
                LastIrreversibleBlockMonitoringPeriod = TimeSpan.FromSeconds(5),
                NodeUrl                 = "http://localhost:7777/api",
                NodeUser                = "******",
                NodePassword            = "******",
                MonitoringServiceClient = new MonitoringServiceClientSettings
                {
                    MonitoringServiceUrl = "http://localhost:5431"
                }
            };

            _settingsMock.PrepareSettings(prepareSettings);
        }