views:

270

answers:

2

I'm using VS2008 Team Suite, ASP.NET MVC Beta, with TestDriven.Net installed. When I created my project from the template, it created a "Tests" project as well and put some controller tests for the AccountController in a folder inside this project. I've added other controllers and associated tests. Howerver, when I right-click on a method in a controller and use the "Create Unit Tests" dialog it fails to create the unit test stub in my existing test class in the project. It creates a new test class file with the same name at the root of the test project, but doesn't insert the test stub. If I move the controller tests up one level from the controllers folder in the test project it works fine.

Does anyone else see this behavior or is it something related to my particular set up? I wouldn't have noticed, but the project segregated the tests in a separate folder, which I thought was a good idea. Now that I'm trying to use it, I either have to create new tests by hand or undo the segregation. If it's just me, any ideas on where to adjust the behavior to fix it?

I have Visual C# test project selected as default in options, with Unit Test as the only file included.

A: 

I've just tried doing this with a controller that I had already created. The controller unit test class was created in the root of the (test) project. When I created a test for another action on the class a second test was created in the same class.

I'm not seeing the separate folders, this test class was created in the root of the test project.

Sorry this wasn't more helpful.

Simon Farrow
A: 

Submitted as a bug on Codeplex.

tvanfosson