Matt Warren 8/14/2014

How to mock sealed classes and static methods

Read Original

This 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.

How to mock sealed classes and static methods

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week