Answered 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