Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (25 sloc) 993 Bytes
using BoDi;
using System;
using TechTalk.SpecFlow;
namespace TestExample
{
[Binding]
public class ConnectionSupport
{
private readonly IObjectContainer objectContainer;
public ConnectionSupport(IObjectContainer objectContainer)
{
this.objectContainer = objectContainer;
}
[BeforeScenario]
public void InitializeConnection()
{
var sqlConnectionString = Environment.GetEnvironmentVariable("TabularAcceptanceTestSqlConnectionString");
var analysisServicersConnectionString = Environment.GetEnvironmentVariable("TabularAcceptanceTestAnalysisServicesConnectionString");
var tabularHelper = new TabularHelper(analysisServicersConnectionString);
var sqlHelper = new SqlHelper(sqlConnectionString);
objectContainer.RegisterInstanceAs<ITabularHelper>(tabularHelper);
objectContainer.RegisterInstanceAs<ISqlHelper>(sqlHelper);
}
}
}