Base solution for your next web application
Open Closed

Unit Test Plugins #6813


User avatar
0
MellowoodMedical created

Hi,

I am trying to unit test plugin service and getting following error:

Castle.MicroKernel.ComponentNotFoundException : No component for supporting the service Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager was found

Can you please suggest.

Thanks, Gaurav Singh


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Can you share some related code?

  • User Avatar
    0
    MellowoodMedical created

    Hi, Sent you email with onedrive link to the above mentioned email.

  • User Avatar
    0
    maliming created
    Support Team

    Because your unit test project (PatientPortal.Tests) references the PatientPortal.Demographic project.

    It depends on the AbpAspNetZeroCoreWebModule module (equivalent to Web.Host). It requires a lot of MVC components to work.

    You can decouple the PatientPortal.Demographic project (eg, PatientPortal.Demographic.Web, PatientPortal.Demographic.Application) for easy unit testing.