How to mock sealed classes and static methods
Read OriginalThis technical article delves into how commercial mocking frameworks (Typemock & JustMock) mock sealed classes and static methods, which standard dynamic proxy-based frameworks cannot. It contrasts standard virtual method mocking with the advanced technique of using the .NET Profiling API's JITCompilationStarted hook to rewrite IL code at runtime, enabling the mocking of otherwise un-mockable elements.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser