I should correct myself a bit... By putting the if on the class level
I need to add every method used by the class, and also add all these
methods to the mock object. It should be added to the method level
where doStuff() is called.
I gave this some thought, and I'm probably just a bit braindamaged by C#.
Consider you wish to unittest a class that fetches data from a database and
sends an
email.
The common scenario here is to use IoC and mock the objects so you can check
that
"FetchData" was called and "SendEmail" is called
On Monday, March 07, 2011 01:46:36 simendsjo wrote:
> Are there any mocking frameworks that actually works for D2?
> And what is possible to mock, and what not?
>
> My guess is only classes and interfaces can be mocked.
> And only non-final classes and non-final methods.
> Is this correct?
There'
Are there any mocking frameworks that actually works for D2?
And what is possible to mock, and what not?
My guess is only classes and interfaces can be mocked.
And only non-final classes and non-final methods.
Is this correct?