Testable code – is it worth it?

יום שבת, נובמבר 17, 2007

  Recently I been refactoring some legasy code and writing a new one. I am using Rhino mocks to run my units and for that I have to write my code in a testable way. This approach makes my code looks not exactly the way I designed and want it to be. Eli Lopian wrote an article about this issue – "Stop Designing for Testability" and has some points to think of. In my opinion, if we have to write very simple code to encapsulate some internal logic for our base class and make sure that...
3 תגובות

Mocking internal methods and classes with Rhino.Mocks

יום שבת, אוקטובר 13, 2007

  After my trip to Thailand Last month (see some photos) I back and jumped right in to coding. I wrote some code at work and tried to fix some unit tests for it using Rhino Mocks. I guess you all familiar with that powerful tool and I will not try to explain how to use it, it been done perfectly by some of my colleagues. I wrote a class like this: public class User { private void DoSomeLogic() { } public void Add() { DoSomeLogic(); ...
תגיות: ,
2 תגובות