locked
How does this compare with TDD using VS Ultimate, Castle Windsor, and Moq

    Question

  • I just stumbled on Pex when downloading Visual Studio 2010 releases. I have never heard of Pex or Moles and wondering if this is complementary or competitive with using a traditional approach to TDD using IoC (Castle Windsor) and Mocks (Moq)? Also, is it compatible with the test framework provided with Visual Studio 2010 Ultimate (I use this rather than NUnit)?
    Wednesday, April 14, 2010 4:09 PM

Answers

  • Pex is complementary to other unit test frameworks -- Pex generates tests, while traditional unit test frameworks only manage already existing tests.

    Pex enables writing "Parameterized Unit Tests", a concept which can be used in TDD just as well (if not better) as traditional unit tests.

    Moles has a different philosophy than other mock frameworks. Instead of a sophisticated API to validate, verify, and to setup expectations, Moles is all about replacing any method with a delegate at test time. The delegate is the place where you can express your desired mocking logic in code.

    Pex and Moles work on top of many traditional unit test frameworks, such as NUnit, XUnit, and also the Visual Studio unit test framework.

    We have some tutorials on http://research.microsoft.com/en-us/projects/pex/documentation.aspx which are a great starting point to find out what Pex and Moles are about.


    Nikolai Tillmann
    Wednesday, April 14, 2010 5:20 PM
    Owner
  • Moles also allow to deal with static methods, sealed types, non-virtual methods.
    Jonathan "Peli" de Halleux - Give us your input about Pex!
    Wednesday, April 14, 2010 6:38 PM
    Owner

All replies

  • Pex is complementary to other unit test frameworks -- Pex generates tests, while traditional unit test frameworks only manage already existing tests.

    Pex enables writing "Parameterized Unit Tests", a concept which can be used in TDD just as well (if not better) as traditional unit tests.

    Moles has a different philosophy than other mock frameworks. Instead of a sophisticated API to validate, verify, and to setup expectations, Moles is all about replacing any method with a delegate at test time. The delegate is the place where you can express your desired mocking logic in code.

    Pex and Moles work on top of many traditional unit test frameworks, such as NUnit, XUnit, and also the Visual Studio unit test framework.

    We have some tutorials on http://research.microsoft.com/en-us/projects/pex/documentation.aspx which are a great starting point to find out what Pex and Moles are about.


    Nikolai Tillmann
    Wednesday, April 14, 2010 5:20 PM
    Owner
  • Moles also allow to deal with static methods, sealed types, non-virtual methods.
    Jonathan "Peli" de Halleux - Give us your input about Pex!
    Wednesday, April 14, 2010 6:38 PM
    Owner
  • Moles also allow to deal with static methods, sealed types, non-virtual methods.
    Jonathan "Peli" de Halleux - Give us your input about Pex!
    Wednesday, April 14, 2010 6:38 PM
    Owner