Base solution for your next web application

Activities of "sdelot"

Question

Hi, (Asp.net Mvc 5x and JQuery) I tried to Test my app through .Test project, it was failed. but when i try the same app in browser console the result was correct. how can i test the app through .Test project.

public class LicielJobApp_Test : AppTestBase { private readonly ILicielJobsAppService _LicielJobsAppService;

    public LicielJobApp_Test()
    {

        _LicielJobsAppService = Resolve<ILicielJobsAppService>();
    }
    [Fact]
    public void Should_get_jobList()
    {
        var job = _LicielJobsAppService.GetLicielJobs(new GetLicielJobsInput());
        job.Items.Count.ShouldBe(2);
    }

We success fully downloaded and it is running perfectly. We tried to develop a page like "Phone Book" and we done all step by step instructions. There is no building errors but, i am getting a server error listed below. how can i solve this?

Server Error in '/' Application. Can't create component 'LICIEL.LICIELWeb.Web.Areas.Mpa.Controllers.JobsController' as it has dependencies to be satisfied.

'LICIEL.LICIELWeb.Web.Areas.Mpa.Controllers.JobsController' is waiting for the following dependencies:

  • Service 'LICIEL.LICIELWeb.Jobs.IjobAppService' which was not registered. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Castle.MicroKernel.Handlers.HandlerException: Can't create component 'LICIEL.LICIELWeb.Web.Areas.Mpa.Controllers.JobsController' as it has dependencies to be satisfied.

'LICIEL.LICIELWeb.Web.Areas.Mpa.Controllers.JobsController' is waiting for the following dependencies:

  • Service 'LICIEL.LICIELWeb.Jobs.IjobAppService' which was not registered.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HandlerException: Can't create component 'LICIEL.LICIELWeb.Web.Areas.Mpa.Controllers.JobsController' as it has dependencies to be satisfied.

'LICIEL.LICIELWeb.Web.Areas.Mpa.Controllers.JobsController' is waiting for the following dependencies:

  • Service 'LICIEL.LICIELWeb.Jobs.IjobAppService' which was not registered. ] Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency() +18 Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) +186 Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) +23 Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context) +12 Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy) +107 Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) +42 Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments) +14 Castle.Windsor.WindsorContainer.Resolve(Type service) +13 Abp.Dependency.IocManager.Resolve(Type type) +38 Abp.Web.Mvc.Controllers.WindsorControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +69 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +88 System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +194 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +50 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Showing 1 to 2 of 2 entries