protected BaseScenario(TestServerFixture testServerFixture)
 {
     TestServer      = testServerFixture.Server;
     HttpClient      = testServerFixture.CreateClient();
     DynamoDbContext = TestServer.Services.GetRequiredService <IDynamoDBContext>();
     SqsClient       = TestServer.Services.GetRequiredService <IAmazonSQS>();
 }
Exemplo n.º 2
0
        public FileStoreTests(TestServerFixture <FileStoreStartup> factory)
        {
            _client = factory.CreateClient(new WebApplicationFactoryClientOptions
            {
                HandleCookies = false
            });

            var options = factory.Services.GetService <IOptions <FileStoreOptions> >().Value;

            _logFilePath = Path.Combine(Directory.GetCurrentDirectory(), options.SavePath, options.FileName);

            if (File.Exists(_logFilePath))
            {
                File.Delete(_logFilePath);
            }
        }
Exemplo n.º 3
0
 public ControllerTestBase(TestServerFixture testServerFixture)
 {
     TestServerFixture = testServerFixture;
     HttpClient        = testServerFixture.CreateClient();
 }