I understand how to mock interfaces or virtual method calls. But frameworks like TypeMock can mock everything in the framework. Which .NET mechanisms are used to provide such functions?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Typemock Isolator for example uses the CLR profiler API to intercept .NET calls and change them during runtime:
Quote:
Mock Everything is one of the feature for Mock frameworks. Mock everything in short is to mock everything in a class, such as
JustMock & TypeMock both provide this feature.
You can actually look at source code of some open source mock frameworks such as Moq framework ,Easy Mock, Rhino Mocks etc.
Disclosure: Please note that link provided is of my own website