Testing handlers/filters that access IDependencyScope in Web API
Read OriginalThis technical article explains how to test ASP.NET Web API filters and message handlers that access the IDependencyScope for dependency resolution. It discusses the challenges of coupling to the dependency resolver, proposes a solution using constructor injection with a Func delegate for better testability, and provides a concrete example using a RavenDB unit-of-work filter with accompanying unit tests.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser