Exemple #1
0
        public void SetUp()
        {
            _mailCheckAuthorisationService = A.Fake <IMailCheckAuthorisationService>();

            _client = Factory.WithWebHostBuilder(builder =>
            {
                builder.ConfigureTestServices(services =>
                {
                    services.Replace(new ServiceDescriptor(typeof(IMailCheckAuthorisationService), _mailCheckAuthorisationService));
                });
            }).CreateClient();
        }
        public void SetUp()
        {
            WebApplicationFactory <StartUp> factory = new WebApplicationFactory <StartUp>();

            _mailCheckAuthorisationService = A.Fake <IMailCheckAuthorisationService>();
            _aggregateReportDao            = A.Fake <IAggregateReportApiDao>();

            _client = factory.WithWebHostBuilder(builder =>
            {
                builder.ConfigureTestServices(services =>
                {
                    services.Replace(new ServiceDescriptor(typeof(IMailCheckAuthorisationService), _mailCheckAuthorisationService));
                    services.Replace(new ServiceDescriptor(typeof(IAggregateReportApiDao), _aggregateReportDao));
                });
            }).CreateClient();
        }