public Fixture()
            {
                HubAccessor = () => Hub;
                var loggingOptions = new SentryLoggingOptions
                {
                    InitializeSdk = false,
                };

                loggingOptions.InitializeSdk = false;

                Client.When(client => client.CaptureEvent(Arg.Any <SentryEvent>(), Arg.Any <Scope>()))
                .Do(callback => callback.Arg <Scope>().Evaluate());

                var hub = new Hub(new SentryOptions {
                    Dsn = DsnSamples.ValidDsnWithSecret
                });

                hub.BindClient(Client);
                Hub = hub;
                var provider = new SentryLoggerProvider(hub, Clock, loggingOptions);

                _disposable  = provider;
                SentryLogger = provider.CreateLogger(nameof(SentryLogger));
                _            = HttpContext.Features.Returns(FeatureCollection);
            }
Beispiel #2
0
            public Fixture()
            {
                var loggingOptions = new SentryLoggingOptions
                {
                    InitializeSdk = false,
                };

                loggingOptions.InitializeSdk = false;

                var hub = new Hub(new SentryOptions {
                    Dsn = DsnSamples.Valid
                });

                hub.BindClient(Client);
                Hub = hub;
                var provider = new SentryLoggerProvider(hub, Clock, loggingOptions);

                _disposable  = provider;
                SentryLogger = provider.CreateLogger(nameof(SentryLogger));
                HttpContext.Features.Returns(FeatureCollection);
            }