locked
NUnit to MS Unit testing Static Methods RRS feed

  • Question

  • After converting all the attributes over to MS under their reference in the project file, how do I get rid of the annoying test errors about [TestMethods] having the wrong signature and having to be marked as static? I have seen what others have posted in making [ClassInitialize] and [ClassCleanup] static, but that doesn't seem to clear the issue up.

    Thanks,

    Tuesday, August 13, 2013 2:52 PM

Answers

All replies

  • Hi Joe,

    The following document share us the detailed steps about how to run NUnit tests in VS2010, it also shared us the information about MS static methods, hope it could help.

    Reference:

    How to run NUnit tests in Visual Studio 2010/MSTest

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, August 14, 2013 8:42 AM
    Moderator
  • Jack,

    I had seen this reference before, but it was a little unclear on how to implement the constructor/destructor in an actual CSproj file. I understand switching the base template, but I guess I was a little unsure of what it means by faking the NUnit instance startup/teardown methods, just use the constructor and destructor of your base class.

    Any thoughts on how I might do that in VS 2010?

    Thanks

    Wednesday, August 14, 2013 4:38 PM
  • Hi Joe,

    Glad to receive your reply.

    Not the real NUnit test expert, but if possible, you could post this issue here:

    http://www.nunit.org/index.php?p=contactUs like Edwer’s suggestion in this thread, maybe you would get better response from the Nunit Test expert. Sorry for no help to you.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 15, 2013 6:41 AM
    Moderator