public static void TestSetup(IObjectContainer objectContainer)
        {
            HttpClient httpClient;

            databaseRoot   = new InMemoryDatabaseRoot();
            contextOptions = new DbContextOptionsBuilder <DataRetrievalContext>()
                             .UseInMemoryDatabase(DatabaseName, databaseRoot).Options;
            var webAppFactory = new InMemoryFactory <FakeResponseServer.Startup>(DatabaseName, databaseRoot);

            httpClient = webAppFactory.CreateClient("http://localhost:2222");

            var spotifyClient = new ExternalAPICaller(httpClient);

            var dataSource = new DataPort(contextOptions, spotifyClient);

            clientDriver = new ApiClientDriver();
            clientDriver.SetUp(dataSource.ExternalAPIGateway);

            objectContainer.RegisterInstanceAs <IClientDriver>(clientDriver);
            objectContainer.RegisterInstanceAs(dataSource);

            Thread.Sleep(TimeSpan.FromSeconds(1));
        }
Exemplo n.º 2
0
 public MusicHistorySteps(IClientDriver clientDriver, DataPort dataSource)
 {
     this.clientDriver = clientDriver;
     this.dataSource   = dataSource;
 }
Exemplo n.º 3
0
 public ComparisonSteps(IClientDriver clientDriver, DataPort dataSource)
 {
     this.clientDriver = clientDriver;
     this.dataSource   = dataSource;
 }