locked
Multiple assemblies in a single pex unit test project? RRS feed

  • Question

  • Is it possible to write pex unit tests for multiple assemblies in a single unit test project?

    Currently I have a solution with three projects - let's call them...Project1, UnitTest, & Console1 - and the Project1 code is being tested in the UnitTest project. However, now I need to write pex unit tests for Console1 as well. When I tried to "Create Parameterized Unit Tests" for a method in Console1, it wouldn't allow me to select my UnitTest project as my output project...it forced me to create a new test project instead.

    This is not ideal. I would much rather have all of my pex unit testing code in a single project, than a test project for each and every test assembly. Is there a way to do this?

    Thanks.

    Tuesday, December 7, 2010 8:56 PM

All replies

  • Manually yes but not out of the box.

    Create separate projects using 'Create Paramerized Unit Tests' then copy the sources manually into the unified project. Also make sure to add the 'PexAssemblyUnderTest' attribute (from PexAssemblyInfo.cs) that specifies which assemblies are being tested by a particular test project.

     


    Jonathan "Peli" de Halleux - Try Pex online at www.pexforfun.com!
    Monday, January 10, 2011 10:45 PM