Suraj Rai

Suraj Rai

  • NA
  • 111
  • 0

Moq unit testing for void methods

Feb 15 2012 10:35 AM

Hi,

I am working on a component based application. I have a method that does some calculation and returns nothing.

say:

public void DoSomething(int x, int y)
{
       // do something
}

How to write testing for it.
I can pass some dummy x,y values. But how and what we can Assert in the unit test project.

Any help would be appreciated.

Thanks.
Regards


Answers (2)