Example #1
0
        public RabbitMQServerFixture()
        {
            if (Docker.Default == null)
            {
                return;
            }

            var testLog = AssemblyTestLog.ForAssembly(typeof(RabbitMQServerFixture <TStartup>).Assembly);

            _logToken = testLog.StartTestLog(null, $"{nameof(RabbitMQServerFixture<TStartup>)}_{typeof(TStartup).Name}", out _loggerFactory, LogLevel.Trace, "RabbitMQServerFixture");
            _logger   = _loggerFactory.CreateLogger <RabbitMQServerFixture <TStartup> >();

            Docker.Default.Start(_logger);

            FirstServer  = StartServer();
            SecondServer = StartServer();
        }
        public RabbitMQServerFixture()
        {
            // Docker is not available on the machine, tests using this fixture
            // should be using SkipIfDockerNotPresentAttribute and will be skipped.
            if (Docker.Default == null)
            {
                return;
            }

            var testLog = AssemblyTestLog.ForAssembly(typeof(RabbitMQServerFixture <TStartup>).Assembly);

            _logToken = testLog.StartTestLog(null, $"{nameof(RabbitMQServerFixture<TStartup>)}_{typeof(TStartup).Name}", out _loggerFactory, LogLevel.Trace, "RabbitMQServerFixture");
            _logger   = _loggerFactory.CreateLogger <RabbitMQServerFixture <TStartup> >();

            Docker.Default.Start(_logger);

            FirstServer  = StartServer();
            SecondServer = StartServer();
        }