Unit testing for Mixed Code
-
Friday, December 16, 2011 12:03 AM
Hello.
I'm trying out the Visual Studio 11 Developer Preview. I'm trying to write a mixed mode unit test. I would like to test a project which is mixed. I think I have everything set-up/working. But when I run the test in the Unit Test Explorer, I get Could not load file or assembly 'UnitTest1.dll' or one of it's dependencies. The specified module could not be found. Are there some guides. My project is simple
Start a new WindowsForms application
Drop button1 on it
Drop label1 on it
Implement button1 click to change lable1->Text
make this click event public
add a getLabel which returns the label1->Text
Add a Native Unit Test to the solution
In the TEST_METHOD(TestMethod1)
create Form1
call button1_Click
Assert::AreEqual( Form1->getLabel(), L"test value");
then build the solution,
run the Unit Test Explorer
build the solution so the Unit Test Explorer can find the test.
Run it and I get the error above.
George P Botuwell, Programmer
All Replies
-
Friday, December 30, 2011 5:26 AMOwner
George,
Can i get you to file a bug at: https://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx
Thanks
Chuck
- Marked As Answer by Charles SterlingMicrosoft Employee, Owner Friday, December 30, 2011 5:26 AM
-
Tuesday, March 13, 2012 5:37 PM
George,
By 'Mixed Mode', what exactly are you referring to? Can you share sample project with us to understand your setup better?
Could you please open a connect bug as suggested by Charles Sterling and attach the sample project for further investigation by the product team.
Thanks,
Srujan.

