Skip to main content

Posts

Showing posts with the label unit-testing

Unit Testing Critical Legacy Code

I once worked on a medical project which required intense Unit Testing in C#. A problem I encountered is that all of the critical sections of the code can't be accessed or required a massive amount of object dependencies. The dilemma I was in drove me to search for a new soluion. Good thing I found TypeMock Isolator. TypeMock Isolator is a mocking framework that can take control of function calls regardless if it is accessible or not such as privately declared functions and etc. This Framework is center-focused on white box testing legacy code; although, can be used for black box testing. Why use it? Code not Written using SOLID Principles Tested code is not following TDD(Test Driven Development) Testing legacy code Unrefactorable tested code Excellent for mission critical code. Mock Instantiation Using Typemock Isolator, object instantiations can be ignored. Ignore Constructor ClassToTest obj = Isolate.Fake.Instance<ClassToTest> (Members.CallOriginal, Cons...