public IntegrationTest(DatabaseFixture fixture) { this.fixture = fixture; server = new TestServer(new WebHostBuilder() .ConfigureServices(services => { fixture.ConfigureServices(services); services.AddSingleton <IRtspService>(s => { var handler = server.CreateHandler(); return(new HttpRtspService(new HttpClient(new HttpResponseLogger(response => { // keep track of the latest response so we can assert against it this.response = response; }, handler)) { BaseAddress = new Uri("http://example.com/") })); }); }) .UseStartup <TestStartup>() ); api = Services.GetRequiredService <IRtspService>(); }
public VideoController(VideoConverter videos, IRtspService api, IOptions <StreamingOptions> opts) { this.videos = videos; this.api = api; this.opts = opts.Value; }