Example #1
0
        public ServerCertificateTests()
        {
            _logger     = new TestLogger(LogLevel.Trace);
            _server     = new MockApmServer.MockApmServer(_logger, nameof(ServerCert_Should_Allow_Https_To_Apm_Server), true);
            _port       = _server.FindAvailablePortToListen();
            _waitHandle = new ManualResetEvent(false);

            _server.OnReceive += o =>
            {
                if (o is TransactionDto)
                {
                    _waitHandle.Set();
                }
            };

            _server.RunInBackground(_port);
        }
Example #2
0
        public static void Main(string[] args)
        {
            var mockApmServer = new MockApmServer(new FlushingTextWriterToLoggerAdaptor(Console.Out, LogLevel.Trace), nameof(Main));

            mockApmServer.Run(ConfigConsts.DefaultValues.ApmServerPort);
        }