public void Service_Should_Get_Resolved()
    {
        //Act
        var YourService = _serviceProvider.GetService <IYourService>();

        //Assert
        Assert.IsNotNull(YourService);
    }
Пример #2
0
        public PostServiceTests()
        {
            var webHost = WebHost.CreateDefaultBuilder()
                          .UseStartup <Startup>()
                          .Build();

            _serviceProvider = new DependencyResolverHelpercs(webHost);
            postService      = _serviceProvider.GetService <IPostService>();
        }