public void Service_Should_Get_Resolved() { //Act var YourService = _serviceProvider.GetService <IYourService>(); //Assert Assert.IsNotNull(YourService); }
public PostServiceTests() { var webHost = WebHost.CreateDefaultBuilder() .UseStartup <Startup>() .Build(); _serviceProvider = new DependencyResolverHelpercs(webHost); postService = _serviceProvider.GetService <IPostService>(); }