Tuesday, January 15th, 2019

 

The unit test mock and related terms (Test Double): a note and examples to martin old article

Ref: https://www.martinfowler.com/articles/mocksArentStubs.html http://xunitpatterns.com/Test%20Double.html https://github.com/kensipe/spock-mocks-nfjs http://nilhcem.com/FakeSMTP/. It is hard to not write unit test for your programmer job. Of course, you can quit if you do not like to write and your boss requests. But, anyway, it is better to write to ensure your code is safe to run, and your job is safe to stay. Most of your unit test main object, i.e. system under test (SUT), are relied on dependency object.  For example, you have Order class and Warehouse class. When you fill the order in Order.fill method, youRead More

......