MyTested.AspNetCore.Mvc icon indicating copy to clipboard operation
MyTested.AspNetCore.Mvc copied to clipboard

Allow instance creation to be with inner builder

Open ivaylokenov opened this issue 6 years ago • 0 comments

.Instance should allow creating controllers and view components with inner builder like so:

MyController<MyMvcController>
    .Instance(instance => instance    
        .WithOptions(options => options
            .For<MyAppSettings>(settings => settings.Cache = true))
        .WithSession(session => session
            .WithEntry("MySession", "MySessionValue")))
    .Calling(c => c.MyAction())
    .ShouldReturn()
    .View();

It should directly use the IControllerBuilder and IViewComponentBuilder interfaces.

ivaylokenov avatar Aug 18 '19 08:08 ivaylokenov