public void RiseErrorOkWhenMiddlewareInitialized() { var _ = new ErrorLogMiddleware(_requestDelegate, _errorLog, _loggerFactory, _options); var httpContext = new DefaultHttpContext(); Func <Task> act = async() => await ElmahExtensions.RaiseError(httpContext, new Exception()); act.Should().NotThrowAsync(); }
public void WhenInitMiddlewareSetsStaticExtension() { var _ = new ErrorLogMiddleware(_requestDelegate, _errorLog, _loggerFactory, _options); ElmahExtensions.LogMiddleware.Should().NotBeNull(); }