constructors not called?

Topics: ReSharper test runner
Jun 27, 2009 at 5:25 PM


Apologies if I'm totally missing this, but my constructors don't seem to be called when using Resharper runner for xUnit tests.  Is this expected behavior?

Jun 30, 2009 at 11:29 PM

Nope, it's not expected behaviour, unless your test methods are static. Then, the constructor doesn't get called because the test doesn't need an instance of the class.

The only other thing I can think of is that you have more than one constructor, and only the default constructor gets called?

Hope this helps

Jun 30, 2009 at 11:38 PM


I'm embarrassed I ever asked this question.  My methods were static so of course the constructor would never be called.  Sorry for the trouble.