Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>@Pure.Krome: good response but I will add a few details </p> <p>@Kevin: You have to choose a solution depending on the changes that you can bring to the code.<br> If you can change it, some dependency injection make the code more testable. If you can't, you need a good isolation.<br> With free mocking framework (Moq, RhinoMocks, NMock...) you can only mock delegates, interfaces and virtual methods. So, for static, sealed and non-virtual methods you have 3 solutions: </p> <ul> <li><strong>TypeMock Isolator</strong> (can mock everything but it's expensive) </li> <li><strong><a href="http://www.telerik.com/products/mocking.aspx">JustMock</a> of Telerik</strong> (new comer, less expensive but still not free) </li> <li><strong><a href="http://research.microsoft.com/en-us/projects/moles/">Moles</a> of Microsoft</strong> (the only free solution for isolation)</li> </ul> <p><strong>I recommend Moles</strong>, because it's free, efficient and use lambda expressions like Moq. Just one important detail: Moles provide stubs, not mocks. So you may still use Moq for interface and delegates ;) </p> <blockquote> <p><strong>Mock:</strong> a class that implements an interface and allows the ability to dynamically set the values to return/exceptions to throw from particular methods and provides the ability to check if particular methods have been called/not called.<br> <strong>Stub:</strong> Like a mock class, except that it doesn't provide the ability to verify that methods have been called/not called.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload