What do programmers mean when they say, “Code against an interface, not an object.”?

前端 未结 7 1723
情书的邮戳
情书的邮戳 2020-11-27 11:21

I\'ve started the very long and arduous quest to learn and apply TDD to my workflow. I\'m under the impression that TDD fits in very well with IoC principle

相关标签:
7条回答
  • 2020-11-27 11:58

    This screencast explains agile development and TDD in practice for c#.

    By coding against an interface means that in your test, you can use a mock object instead of the real object. By using a good mock framework, you can do in your mock object whatever you like.

    0 讨论(0)
提交回复
热议问题