RhinoMock vs. TypeMock vs. NUnit's Mocking?

后端 未结 4 1248
孤城傲影
孤城傲影 2020-12-05 11:08

I am just starting to do Test Driven Development, and I am wondering the major differences between RhinoMock, TypeMock, and NUnit\'s built-in mocking?

Any informatio

4条回答
  •  [愿得一人]
    2020-12-05 11:20

    I use TypeMock all the time and have found it to be a very powerful tool that can improve the coverage of my unit tests. This is because I work with SharePoint and only TypeMock can allow me to mock out SharePoint classes - since they are concrete classes and not interfaces.

    Mocking SharePoint classes is not possible with RhinoMock, Moq, NUNit, etc since (I believe) they require interfaces to mock objects, rather then being able to mock the actual concrete classes.

    If your code does use a lot of interfaces, and you don't require mocking concrete classes then TypeMock is a bit pricey, but for the power you get, it's worth it.

提交回复
热议问题