ASP.NET HostType and Moles HostType RRS feed

  • Question

  • Hello,

    I want to unit test an ASP.NET WebForms application that is having a DataGrid with a Delete command associated. As mocking framework I'd like to use Moles Framework but it requires a HostType("Moles") attribute (which has AllowMultiple = false). 

    Is it possible to use ASP.NET Host Type and Moles HostType at the same time? I have to use the Moles since it can mock sealed classes.



    Monday, April 30, 2012 7:01 PM


  • Hi Eusebiu,

    Thank you for posting in the MSDN forum.

    We are not permitted to provide support on our forums for the Pex and Moles. As the PEX team mentioned that they will migrate forums to stackoverflow.com (http://research.microsoft.com/en-us/projects/pex/), you can visit there.

    In addition, The Asp.net [Host Type ()] attribute specifies the host adapter the unit test will run in. We do not have to change this attribute. For more information, see Unit Tests for ASP.NET Web Services.

    About the Moles HostType, My suggestion is that you could post a thread in the correct forum, and make sure that when we could use it and how we could use it, and then run and check them at the same time. Thanks for your understanding.

    Have a nice day,

    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, May 2, 2012 3:31 AM