locked
Pex and NUnit test ManagedThreadId RRS feed

  • Question

  • I use Pex to generate NUnit tests, my problem is that Pex generates beside other asserts the following:

    PexAssert.AreEqual<int>
            (3, ((DispatcherObject)activationSettingsImpl).Dispatcher.Thread
                  .ManagedThreadId);
    PexAssert.AreEqual<string>("Pex Exploration Worker Thread", 
                                   ((DispatcherObject)activationSettingsImpl).Dispatcher.Thread.Name);

    The method that should be tested emits a PropertycChanged event. I think it's strange that Pex adds a fixed number "3" for the test of equal ThreadIds as also the Name of the Thread seems rather strange.

    My unit test stops at this assert and I have no clue how to solve this. How can this be fixed, or is there a way to tell Pex not to check the ID at all.

    Tuesday, September 4, 2012 2:50 PM

Answers

  • Hi, in VS 2010 Pex and Moles are pilot project as VS PowerTools, and the product with VS 2010 is not supported.

    Please send email to report Pex issues: pexbug@microsoft.com

    with regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    • Proposed as answer by Forrest Guo Wednesday, September 5, 2012 3:09 PM
    • Marked as answer by Amanda Zhu Sunday, September 9, 2012 12:16 AM
    Wednesday, September 5, 2012 3:09 PM

All replies

  • Hello Andreas,

    Thank you for posting in the MSDN forum.

    I would like to know which version of Visual Studio you are working with. VS2010 or VS2012?

    If you use VS2010, there may be tons of issues.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 5, 2012 2:57 AM
  • Hi Amanda,

    I'm using VS2010... maybe you can give it a start...

    Thanks

    Andreas

    Wednesday, September 5, 2012 5:55 AM
  • Hi Andreas,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 5, 2012 7:27 AM
  • Hi, in VS 2010 Pex and Moles are pilot project as VS PowerTools, and the product with VS 2010 is not supported.

    Please send email to report Pex issues: pexbug@microsoft.com

    with regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    • Proposed as answer by Forrest Guo Wednesday, September 5, 2012 3:09 PM
    • Marked as answer by Amanda Zhu Sunday, September 9, 2012 12:16 AM
    Wednesday, September 5, 2012 3:09 PM