Is there any free funny framework that can mock methods and classes that are not virtual, static, or hermetic?

I know there are TypeMock and JustMock, but both are commercial products and quite expensive. Are there free or open source fake frameworks that can compete with two?

I use Moq, but I wonder if open source can catch up? Perhaps Moles is the answer (http://msdn.microsoft.com/en-us/library/ff798506.aspx), although it does not provide all the typical functions that you expect, or maybe someone is already working on something something like this http://www.testingreflections.com/node/view/8562

+3
source share
1 answer

AFAIK, MS Moles can do everything you need. It is only that it is quite demanding on performance, and it has a rather difficult to recognize "API" (which in sum makes it much more expensive than its commercial counterparts!).

Insulation structures like Typemock, JustMock and Moles have a completely different technical background compared to free fake frameworks like Rhino, Moq, etc. Therefore, they cannot be compared. You use the fake infrastructure to create TDD in a new project if you have the necessary software development skills (mostly SOLID). You use an isolation environment if you need to write tests for legacy code that wasn’t written for testing purposes.

, - . , , , , , Typemock .. ( btw.: Moles ...)

+2

Source: https://habr.com/ru/post/1768657/


All Articles