public void WithServicesDirectlyShouldWorkCorrectly() { var service = new InjectedService(); var anotherService = new AnotherInjectedService(); MyViewComponent <MultipleServicesComponent> .Instance() .WithDependencies(service, anotherService) .InvokedWith(c => c.Invoke()) .ShouldReturn() .View() .ShouldPassForThe <MultipleServicesComponent>(viewComponent => { Assert.Same(service, viewComponent.InjectedService); Assert.Same(anotherService, viewComponent.AnotherService); }); }
public void WithServicesDirectlyShouldWorkCorrectly() { var service = new InjectedService(); var anotherService = new AnotherInjectedService(); MyViewComponent<MultipleServicesComponent> .Instance() .WithServices(service, anotherService) .InvokedWith(c => c.Invoke()) .ShouldReturn() .View() .ShouldPassForThe<MultipleServicesComponent>(viewComponent => { Assert.Same(service, viewComponent.InjectedService); Assert.Same(anotherService, viewComponent.AnotherService); }); }